[wp-trac] [WordPress Trac] #33645: Change in formatting.php [ Version Wordpress 4.2.4] to add wpnl comment breaks sites.

WordPress Trac noreply at wordpress.org
Tue Sep 1 10:49:49 UTC 2015


#33645: Change in formatting.php [ Version Wordpress 4.2.4] to add wpnl comment
breaks sites.
--------------------------+-----------------------------
 Reporter:  Thomas Hicks  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  4.2.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Our site had a commented out section of code (within <!-- -->) within a
 post on a page.

 previously ( < 4.2.3), newlines in the code were replaced with a space.
 Now this gets replaced with  <!-- wpnl -->, which closes the user made
 commented out code prematurely, leading to elements that should not be
 displayed being displayed on the live site.


 code in question:
 Was (< 4.2.3):

 {{{
 // Strip newlines from all elements.
        $pee = wp_replace_in_html_tags( $pee, array( "\n" => " " ) );
 }}}

 Now (4.2.4):

 {{{
 // Find newlines in all elements and add placeholders.
 $pee = wp_replace_in_html_tags( $pee, array( "\n" => " <!-- wpnl --> " )
 );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33645>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list