[wp-trac] [WordPress Trac] #48698: Update fails if there’s a "Custom Html" block and an Iframe inside it
WordPress Trac
noreply at wordpress.org
Tue Jan 21 08:26:16 UTC 2020
#48698: Update fails if there’s a "Custom Html" block and an Iframe inside it
--------------------------+------------------------------
Reporter: ozgurnevres | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.3
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by stidch):
I also face an issue here with pages and iframes.
My iframe is embedded in a shortcode. I cannot save any page, which
contain a shortcode, which contain an iframe.
For example:
{{{
onload="resizeIframe(this)"
}}}
In my case I try to resize an iframe with the advanced-iframe plugin. The
full shortcode looks like this:
{{{
advanced_iframe src="https://xxx.com/script.php?parameter=value"
frameborder="0" scrolling="no" onload="resizeIframe(this)"
}}}
In an html block above I'v defined the resizeIframe method.
{{{
<script>
function resizeIframe(iframe) {
iframe.height = "10px" // required for reducing the size
iframe.height = iframe.contentWindow.document.body.scrollHeight + "px";
}
</script>
}}}
If I remove the part
{{{
onload="resizeIframe(this)
}}}
from the shortcode I can successfully save the page. With I can't.
I've tried already with disabled plugins and default theme.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48698#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list