WordPress.org

Make WordPress Core

Changeset 34024


Ignore:
Timestamp:
09/10/2015 10:22:41 PM (5 years ago)
Author:
azaozz
Message:

Formatting: fix removing line break placeholders from HTML comments at the end of wpautop().

Props miqrogroove.
Fixes #33645 for 4.3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3/src/wp-includes/formatting.php

    r33624 r34024  
    597597
    598598    // Restore newlines in all elements.
    599     $pee = str_replace( " <!-- wpnl --> ", "\n", $pee );
     599    if ( false !== strpos( $pee, '<!-- wpnl -->' ) ) {
     600        $pee = str_replace( array( ' <!-- wpnl --> ', '<!-- wpnl -->' ), "\n", $pee );
     601    }
    600602
    601603    return $pee;
Note: See TracChangeset for help on using the changeset viewer.