[wp-trac] [WordPress Trac] #34698: HTML-Embed code JavaScript error.

WordPress Trac noreply at wordpress.org
Thu Nov 19 05:04:54 UTC 2015


#34698: HTML-Embed code JavaScript error.
-------------------------------------------------+-------------------------
 Reporter:  nendeb55                             |       Owner:  swissspidy
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.4
Component:  Embeds                               |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-unit-   |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by nendeb55):

 Thanks for the patch.

 I will be reliable in this in future.
 But I cannot cope in WordPress of the version that is old when it is this.
 I suggest that I change a cord in `wp-embed.js`,`wp-embed.min.js` and
 `get_post_embed_html()`.

 Exsample in wp-embed.js
 {{{
 /* Only continue if link hostname matches iframe's hostname. */
 if ( targetURL.host === sourceURL.host && document.activeElement ===
 source ) {
         window.top.location.href = data.value;
 }
 }}}

 To

 {{{
 /* Only continue if link hostname matches iframe's hostname. */
 if ( targetURL.host === sourceURL.host ) {
         if (document.activeElement === source ) {
                 window.top.location.href = data.value;
         }
 }
 }}}

 `&&` It has been used three locations

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34698#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list