WordPress.org

Make WordPress Core

Ticket #1258: curly_quotes_patch.diff

File curly_quotes_patch.diff, 1.3 KB (added by jmstacey, 7 years ago)

Seems to fix the problem

  • wp-includes/formatting.php

     
    1717                $cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause"); 
    1818        } 
    1919 
    20         $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 
    21         $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace); 
     20        $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'\'', ' (tm)'), $cockney); 
     21        $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '”', ' ™'), $cockneyreplace); 
    2222 
    2323        $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); 
    2424        $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2');