Ticket #8775: number_curly_quotes.diff

File number_curly_quotes.diff, 1.3 KB (added by filosofo, 4 years ago)
Line 
1Index: wp-includes/formatting.php
2===================================================================
3--- wp-includes/formatting.php  (revision 10289)
4+++ wp-includes/formatting.php  (working copy)
5@@ -47,8 +47,8 @@
6        $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
7        $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace);
8 
9-       $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
10-       $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2');
11+       $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/"(\d+)"/', '/(\d+)"/', '/(‘\d+)\'/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
12+       $dynamic_replacements = array('’$1','$1‘', '“$1”', '$1″', '$1’', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2');
13 
14        for ( $i = 0; $i < $stop; $i++ ) {
15                $curl = $textarr[$i];