WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #48268, comment 8


Ignore:
Timestamp:
01/21/2020 09:01:07 AM (4 weeks ago)
Author:
stidch
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #48268, comment 8

    initial v1  
    1 Replying to [comment:7 stidch]:
    2 > I don't know if the issue I face is exactly the same, but at least looks similar.
    3 >
    4 > I cannot save any page, which contain a shortcode, which contain a call to a java-script method
    5 >
    6 > For example:
    7 >
    8 > {{{
    9 > onload="resizeIframe(this)"
    10 > }}}
    11 >
    12 >
    13 > In my case I try to resize an iframe with the advanced-iframe plugin. The full shortcode looks like this:
    14 >
    15 > {{{
    16 > advanced_iframe src="https://xxx.com/script.php?parameter=value" frameborder="0" scrolling="no" onload="resizeIframe(this)"
    17 > }}}
    18 >
    19 >
    20 > In an html block above I'v defined the resizeIframe method.
    21 >
    22 > {{{
    23 > <script>
    24 > function resizeIframe(iframe) {
    25 >   iframe.height = "10px" // required for reducing the size
    26 >   iframe.height = iframe.contentWindow.document.body.scrollHeight + "px";
    27 > }
    28 > </script>
    29 > }}}
    30 >
    31 >
    32 > If I remove the part
    33 >
    34 > {{{
    35 > onload="resizeIframe(this)
    36 > }}}
    37 >
    38 > from the shortcode I can successfully save the page. With I can't.
    39 >
    40 > I've tried already with disabled plugins and default theme.
    41 
    421Just found out that my issue is most probably the one which is filed here:
    432https://core.trac.wordpress.org/ticket/48698