Iframe html being stripped from topic content

AI-generated summary

In a support discussion titled ‘Iframe html being stripped from topic content,’ Ads5555 reports that while Google Docs iframes work in an older topic, they’re stripped from new topics despite https://docs.google.com being in the allowed list. JammyDodger suggests adding a trailing slash (https://docs.google.com/), which resolves the issue for Ads5555. janbolmeson confirms the fix and notes it solved a problem they’d struggled with for hours. They also recommend adding this tip to Discourse’s helper text, as the trailing slash requirement was not needed in versions prior to 3.3.X (it worked without in 3.2.X). The issue appears to be a version-specific behavior change affecting iframe rendering in new topics.

Hi,

I am trying to create a new topic with a Google doc in an iframe. I have added https://docs.google.com to the allowed list but it wont show. I previously created a different topic on Jul 6th that does show the iframe correctly (and still works right now). In fact when copying the simple iframe code from the working one to a new topic, it does not work in the new topic. When comparing the source code of both topics, it appears that the iframe html is being stripped out of the new post.

I am the site admin and cant see any overrides that might have caused this to happen.

Any ideas why the iframe in a new topic is being stripped out?

Could you try adding a trailing slash to the value in allowed iframes and see if that helps?

https://docs.google.com/

Ha, that solved it. Thank you.

This solved a problem I spent a couple of hours trying to solve. :see_no_evil_monkey:

Discourse-team, could this not be added to the helper-text? That you need to add a slash to the domain?

(It is also a something that breaks between 3.2.X and 3.3.X. In 3.2.X it works without the slashes).