Make WordPress Core

Ticket #34698: 34698.diff

File 34698.diff, 1.5 KB (added by pento, 11 years ago)
  • src/wp-includes/default-filters.php

     
    131131
    132132add_filter( 'the_content', 'wptexturize'                       );
    133133add_filter( 'the_content', 'convert_smilies'                   );
    134 add_filter( 'the_content', 'convert_chars'                     );
    135134add_filter( 'the_content', 'wpautop'                           );
    136135add_filter( 'the_content', 'shortcode_unautop'                 );
    137136add_filter( 'the_content', 'prepend_attachment'                );
  • src/wp-includes/formatting.php

     
    276276                                // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one!
    277277                                $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1&#215;$2', $curl );
    278278                        }
     279
     280                        // Replace each & with &#038; unless it already looks like an entity.
     281                        $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&#038;', $curl );
    279282                }
    280283        }
    281         $text = implode( '', $textarr );
    282284
    283         // Replace each & with &#038; unless it already looks like an entity.
    284         return preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&#038;', $text );
     285        return implode( '', $textarr );
    285286}
    286287
    287288/**