Changeset 10297 for trunk/wp-includes/compat.php
- Timestamp:
- 01/04/2009 10:25:50 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/compat.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/compat.php
r10236 r10297 97 97 } 98 98 99 // from php.net 100 if ( !function_exists('htmlspecialchars_decode') ) { 99 if ( !function_exists( 'htmlspecialchars_decode' ) ) { 100 // Added in PHP 5.1.0 101 // from php.net (modified by Sam Bauers to deal with some quirks in HTML_SPECIALCHARS constant) 101 102 function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT ) { 102 return strtr( $str, array_flip( get_html_translation_table(HTML_SPECIALCHARS, $quote_style) ) ); 103 } 103 $table = array_flip( get_html_translation_table( HTML_SPECIALCHARS, $quote_style ) ); 104 $table = array_merge( array( ''' => "'" ), $table, array( '&' => "&", '&' => "&" ) ); 105 return strtr( $str, $table ); 106 } 104 107 } 105 108
Note: See TracChangeset
for help on using the changeset viewer.