[wp-trac] [WordPress Trac] #3670: Removing CDATA close tag ( ]]> ) unbalances the CDATA block

WordPress Trac noreply at wordpress.org
Tue Jan 27 16:48:11 UTC 2015


#3670: Removing CDATA close tag ( ]]> ) unbalances the CDATA block
-------------------------------------------------+-------------------------
 Reporter:  scenic                               |       Owner:  andy
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Posts, Post Types                    |  Release
 Severity:  minor                                |     Version:  2.1
 Keywords:  has-patch needs-refresh needs-unit-  |  Resolution:
  tests                                          |     Focuses:  template
-------------------------------------------------+-------------------------

Comment (by truebird):

 @awelzel @sergeyBiryukov @alekv and ALL others wanting a up to date
 current and clean resolution to this 8 year old issue with CDATA errors. I
 have been meaning to post this for a while now for everyone (just getting
 around to it) . . . smile.


 I spoke extensively on the phone with Google developers (this took a lot
 of patience and time to get to the right person). I took him to this
 particular thread and asked if he could give a final current resolution to
 this that is as clean as possible.

 He said he was aware of this issue with WordPress and that the full code
 that is generated at Google is NOT necessary for Wordpress installs. He
 explained to REMOVE the part of the code manually that Wordpress installs
 do not need and it would resolve the issue cleanly.

 Here is what he explained to do with the code you get from Google for
 conversion tracking before placing into Wordpress (this worked perfectly):

 First I will give you a sample of the full code for conversions one might
 get from Google and next I will  explain the part you must keep and then
 what to add to it . . .

 Sample original:

 {{{

 <script type="text/javascript">// < ![CDATA[
 // < ![CDATA[
 // < ![CDATA[
 var google_conversion_id = 1111891111; var google_conversion_language =
 "en"; var google_conversion_format = "3"; var google_conversion_color =
 "ffffff"; var google_conversion_label = "TlwoCMCEoVgQy7m15pp"; var
 google_conversion_value = 67.00; var google_conversion_currency = "USD";
 var google_remarketing_only = false;
 // ]]></script>
 <script src="//www.googleadservices.com/pagead/conversion.js"
 type="text/javascript">// < ![CDATA[
 // < ![CDATA[
 // < ![CDATA[

 // ]]></script>
 <noscript>
 }}}

 Sample of what to keep (other parts you delete) and what to add to it to
 FIX THIS ONCE AND FOR ALL and/or until it is fixed directly in the
 Wordpress core someday:

 {{{
 <div style="display: inline;"><img style="border-style: none;"
 src="https://www.googleadservices.com/pagead/conversion/11115891111/?value=67.00&currency_code=USD&label=TlwoCMCEoVgQy7m15pp&guid=ON&script=0"
 alt="" width="1" height="1" /></div>
 }}}

 ***NOTE: There is only one thing to add and that is the "https:" BEFORE
 the //www.googleadservices.com . . .

 I really hope this help a lot of people with this issue!!!

 :)

 Greg

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


More information about the wp-trac mailing list