Ticket #26850: 26850.6.diff
| File 26850.6.diff, 1.1 KB (added by , 12 years ago) |
|---|
-
src/wp-includes/formatting.php
100 100 // Pattern-based replacements of characters. 101 101 $dynamic = array(); 102 102 103 // '99 '99s '99's (apostrophe) But never '9 or '999 or '99.0. 104 if ( "'" !== $apos ) { 105 $dynamic[ '/\'(?=\d\d(?:\Z|(?!\d|[.,]\d)))/' ] = $apos; 106 } 107 103 108 // Quoted Numbers like "42" or '42.00' 104 109 if ( '"' !== $opening_quote && '"' !== $closing_quote ) { 105 110 $dynamic[ '/(?<=\A|' . $spaces . ')"(\d[\d\.\,]*)"/' ] = $opening_quote . '$1' . $closing_quote; … … 108 113 $dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[\d\.\,]*)\'/' ] = $opening_single_quote . '$1' . $closing_single_quote; 109 114 } 110 115 111 // '99 '99s '99's (apostrophe)112 if ( "'" !== $apos ) {113 $dynamic[ '/\'(?=\d)/' ] = $apos;114 }115 116 116 // Single quote at start, or preceded by (, {, <, [, ", -, or spaces. 117 117 if ( "'" !== $opening_single_quote ) { 118 118 $dynamic[ '/(?<=\A|[([{<"\-]|' . $spaces . ')\'/' ] = $opening_single_quote;