[wp-trac] [WordPress Trac] #33106: Removal of newlines in CDATA breaks inline scripts

WordPress Trac noreply at wordpress.org
Tue Jul 28 22:04:57 UTC 2015


#33106: Removal of newlines in CDATA breaks inline scripts
-----------------------------+--------------------------
 Reporter:  jeremyfelt       |       Owner:  miqrogroove
     Type:  defect (bug)     |      Status:  assigned
 Priority:  highest omg bbq  |   Milestone:  4.2.4
Component:  Formatting       |     Version:  4.2.3
 Severity:  major            |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+--------------------------

Comment (by millertimesites):

 If it is the wrong code, then what should it be then?
 The former code always worked great until the 4.2.3 release and was from
 the
 official AdSense code
 The code from Google:
 {{{
 <script async
 src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
 <!-- 336x280 Content -->
 <ins class="adsbygoogle"
      style="display: inline; float: left; margin: 5px; width: 336px;
 height: 280px;"
      data-ad-client="ca-pub-3788205869703165"
      data-ad-slot="5395550042"></ins>
 <script>
 (adsbygoogle = window.adsbygoogle || []).push({});
 </script>
 }}}

 Is automatically changed to


 {{{
 <script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
 async=""></script><!-- 336x280 Content --> <ins class="adsbygoogle"
 style="display: inline; float: left; margin: 5px; width: 336px; height:
 280px;" data-ad-client="ca-pub-3788205869703165" data-ad-
 slot="5395550042"></ins><script>// <![CDATA[
 (adsbygoogle = window.adsbygoogle || []).push({});
 // ]]></script>
 }}}

 by WordPress when you save the changes

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


More information about the wp-trac mailing list