Ticket #8912: 8912.diff
| File 8912.diff, 2.2 KB (added by , 12 years ago) |
|---|
-
src/wp-includes/formatting.php
70 70 $cockney = $cockneyreplace = array(); 71 71 } 72 72 73 $static_characters = array_merge( array( '---', ' -- ', ' --', '- ', 'xn–', '...', '``', '\'\'', ' (tm)' ), $cockney );74 $static_replacements = array_merge( array( $em_dash, ' ' . $em_dash . ' ', $en_dash,' ' . $en_dash . ' ', 'xn--', '…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace );73 $static_characters = array_merge( array( '---', ' -- ', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)' ), $cockney ); 74 $static_replacements = array_merge( array( $em_dash, ' ' . $em_dash . ' ', ' ' . $en_dash . ' ', 'xn--', '…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace ); 75 75 76 76 $dynamic = array(); 77 $dynamic['/--(?!>)/'] = $en_dash; 77 78 if ( "'" != $apos ) { 78 79 $dynamic[ '/\'(\d\d(?:’|\')?s)/' ] = $apos . '$1'; // '99's 79 80 $dynamic[ '/\'(\d)/' ] = $apos . '$1'; // '99 -
tests/phpunit/tests/formatting/WPTexturize.php
158 158 /** 159 159 * @ticket 8912 160 160 */ 161 function test_wptexturize_html_comments() { 161 function test_wptexturize_closing_html_comment() { 162 $this->assertEquals('<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>', wptexturize('<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>')); 163 } 164 165 /** 166 * @ticket 8912 167 */ 168 function test_wptexturize_inside_html_comments() { 162 169 $this->assertEquals('<!--[if !IE]>--><!--<![endif]-->', wptexturize('<!--[if !IE]>--><!--<![endif]-->')); 163 170 $this->assertEquals('<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->', wptexturize('<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->')); 164 $this->assertEquals('<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>', wptexturize('<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>'));165 171 } 166 172 167 173 /**