WordPress.org

Make WordPress Core

Ticket #33645: 33645-4.3.1.patch

File 33645-4.3.1.patch, 565 bytes (added by azaozz, 5 years ago)
  • src/wp-includes/formatting.php

     
    596596                $pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);
    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;
    602604}