Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

iframe in Grav 2.0

Solved by Andy Miller View solution

Started by David Meissner 3 days ago · 3 replies · 88 views
3 days ago

After upgrading a test site, I just upgraded my staging site to Grav 2.0. The upgrade was very smooth again. One issue: I have a few pages with an embedded iFrame that runs a p5js Javascript file. This has been working fine, but after the upgrade the page with the iframe only shows the iframe HTML as text on the page. Any suggestions for troubleshooting?

3 days ago Solution

There is much stricter content rules in Grav 2.0 as iFrames are a XSS security vulnerability. If you need to use an iframe, you have to remove the iframe tag in the Dangerous HTML Tags of the XSS Security for ContentXSS Security for Content section of the Security configuration.

3 days ago

There are quite a few blogs by Andy dedicated to Grav 2 and I highly recommend reading them all.

A few are about Markdown and why code in Markdown breaks:

👍 1
last edited 07/10/26 by pamtbaau
3 days ago

Thanks very much for both replies. I'll spend some time going through the blog before I migrate my production site.

Suggested topics

Topic Participants Replies Views Activity
Support · by BenLaKnet, 5 days ago
1 118 2 days ago
Support · by BenLaKnet, 1 week ago
5 194 2 days ago
Support · by kskt, 2 days ago
0 42 2 days ago
Support · by David Meissner, 2 days ago
0 39 2 days ago
Support · by David Meissner, 3 days ago
2 103 3 days ago