Ticket #17780: miqro-17780-compat.patch
| File miqro-17780-compat.patch, 1.8 KB (added by , 11 years ago) |
|---|
-
src/wp-includes/formatting.php
688 688 $quote_style = ENT_NOQUOTES; 689 689 } 690 690 691 if ( ! $double_encode ) { 692 // Guarantee every &entity; is valid, convert &garbage; into &garbage; 693 // This is required for PHP < 5.4. 694 $string = wp_kses_normalize_entities( $string ); 695 } 696 691 697 $string = @htmlspecialchars( $string, $quote_style, $charset, $double_encode ); 692 698 693 699 // Backwards compatibility -
tests/phpunit/tests/formatting/EscHtml.php
34 34 35 35 function test_ignores_existing_entities() { 36 36 $source = '& £ " &'; 37 $res = '& &#x 00A3; " &';37 $res = '& £ " &'; 38 38 $this->assertEquals( $res, esc_html($source) ); 39 39 } 40 40 } -
tests/phpunit/tests/formatting/WPSpecialchars.php
85 85 return array( 86 86 array( 87 87 'This & that, this & that, — " " Ú " " " " " $ ×', 88 'This & that, this & that, — " &QUOT; Ú &# 34; " " " " &dollar; ×',88 'This & that, this & that, — " &QUOT; Ú " " " " " &dollar; ×', 89 89 ), 90 90 array( 91 91 '&& && && &;',