# Behavior of iframes within oneboxes in emails

**URL:** <https://meta.discourse.org/t/behavior-of-iframes-within-oneboxes-in-emails/40160>\
**Category:** Development\
**Created:** [2016 年 2 月 25 日午後 2:31 UTC](https://meta.discourse.org/t/behavior-of-iframes-within-oneboxes-in-emails/40160 "2016-02-25T14:31:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [2016 年 2 月 25 日午後 2:31 UTC](https://meta.discourse.org/t/behavior-of-iframes-within-oneboxes-in-emails/40160/1 "2016-02-25T14:31:20Z")

</div>

I’ve developed [a small Onebox plugin](https://github.com/fefrei/discourse-pseuco-onebox/blob/master/plugin.rb) that embeds an interactive element when certain links are posted. They look like this:

 ![](https://global.discourse-cdn.com/meta/original/3X/5/9/5942ad6f4c9069f9ece0d313200060545e3a5b12.png)

This is implemented by inserting an iframe into the onebox:

 ![](https://global.discourse-cdn.com/meta/original/3X/f/e/fe636091116b4d8d85442dc33dd1201491785fbe.png)

Obviously, this won’t work in emails and needs special handling. There already is some special handling for this by default – the `iframe` is replaced by a paragraph with a very strange link inside it:

 ![](https://global.discourse-cdn.com/meta/original/3X/4/7/47d6b181f1bf9ac9e0f1547c37bf5544caf72ca2.png)

What is causing this replacement? How can I modify how the onebox behaves in email? Can I simply disable it for emails and show the original link instead?

---

_[View the full topic](https://meta.discourse.org/t/behavior-of-iframes-within-oneboxes-in-emails/40160)._
