Make WordPress Core

Ticket #32335: 32335.patch

File 32335.patch, 961 bytes (added by azaozz, 9 years ago)
  • src/wp-includes/formatting.php

     
    14711471        'Ÿ' => 'Ÿ'
    14721472        );
    14731473
    1474         // Remove metadata tags
    1475         $content = preg_replace('/<title>(.+?)<\/title>/','',$content);
    1476         $content = preg_replace('/<category>(.+?)<\/category>/','',$content);
    1477 
    14781474        // Converts lone & characters into &#38; (a.k.a. &amp;)
    14791475        $content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&#038;$1', $content);
    14801476
    1481         // Fix Word pasting
    1482         $content = strtr($content, $wp_htmltranswinuni);
     1477        // Fix Word pasting. TODO: still needed?
     1478        if ( strpos( $content, '&#1' ) !== false ) {
     1479                $content = strtr( $content, $wp_htmltranswinuni );
     1480        }
    14831481
    1484         // Just a little XHTML help
    1485         $content = str_replace('<br>', '<br />', $content);
    1486         $content = str_replace('<hr>', '<hr />', $content);
    1487 
    14881482        return $content;
    14891483}
    14901484