Changeset 32850 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 06/18/2015 09:59:10 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r32800 r32850 689 689 } 690 690 691 // Handle double encoding ourselves 692 if ( $double_encode ) { 693 $string = @htmlspecialchars( $string, $quote_style, $charset ); 694 } else { 695 // Decode & into & 696 $string = wp_specialchars_decode( $string, $_quote_style ); 697 698 // Guarantee every &entity; is valid or re-encode the & 699 $string = wp_kses_normalize_entities( $string ); 700 701 // Now re-encode everything except &entity; 702 $string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE ); 703 704 for ( $i = 0, $c = count( $string ); $i < $c; $i += 2 ) { 705 $string[$i] = @htmlspecialchars( $string[$i], $quote_style, $charset ); 706 } 707 $string = implode( '', $string ); 708 } 691 $string = @htmlspecialchars( $string, $quote_style, $charset, $double_encode ); 709 692 710 693 // Backwards compatibility
Note: See TracChangeset
for help on using the changeset viewer.