iFrame stops working

Created on 6 February 2020, almost 5 years ago
Updated 1 February 2024, 11 months ago

When I am making a page with both collapsed text and an iframe, then the iframe is shown in the wysiwyg-editor but not on the actual page.

I have tried to do what I can with the text filters:
- Allow all html or limit it.
- Put it in a different order or something else.
But no matter what then I can't make a page with both an iframe and collapsed text.

For the troubling shooting: I can make a site with iframe and the collapsed text module activated on the text format I am using. But the iframe disappear when I ad a -tag to the site.

I hope for an solution on this. Let me know if I should help by testing something.

Best,
Rasmus MP

🐛 Bug report
Status

Needs review

Version

2.0

Component

Miscellaneous

Created by

🇩🇰Denmark rasmusmp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India imalabya Bangalore

    Adding a patch for 2.0.x branch.

  • 🇫🇷France dydave

    Hi everyone,

    I've just tested this locally with the following versions:

    • collapse_text:2.0.x-dev:ebceea31
    • drupal/core:10.2.2
    • CKEditor5

    I created a node with Full HTML text format with the following HTML markup:

    [collapse]
    <h3>
        Title heading with <em>emphasis</em> and <a href="#">some link</a>
    </h3>
        Example text with markup.
    &nbsp;
    <iframe style="border:2px solid red;" src="https://[LOCAL_DEV_SITE_URL]/" title="Iframe Example" width="600px" height="400px"></iframe>
    [/collapse]
    

     
    and the iframe tag seemed to display fine, see the resulting screenshot below with the page, CKEditor5 and view source displays:

    Not sure if the patch is still needed, so let's keep this issue open a bit longer and see if we can get any more feedback.
    Given the security implications, as mentioned above at #2, ideally, we would prefer keeping the <iframe> tag in the allowed tags filter settings, thus not allowed by default (subject to restrictions of the text format).

    In any case, thanks a lot to everyone for your contributions, patches, help testing, reviews and comments, it's greatly appreciated.

    Feel free to let us know if you're still having issues with <iframe> tags, or if you have more questions, concerns or suggestions on any of the recent code changes, this ticket or the module in general, we would surely be glad to help.
    Thanks in advance!

Production build 0.71.5 2024