mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
htmlspecialchars_decode() for php versions less than 5.1, props sivel, fixes #8679
git-svn-id: http://svn.automattic.com/wordpress/trunk@10236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
199e79af54
commit
79eab52909
@ -96,4 +96,11 @@ function _mb_strcut( $str, $start, $length=null, $encoding=null ) {
|
||||
return implode( '', $chars );
|
||||
}
|
||||
|
||||
// from php.net
|
||||
if ( !function_exists('htmlspecialchars_decode') ) {
|
||||
function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT ) {
|
||||
return strtr( $str, array_flip( get_html_translation_table(HTML_SPECIALCHARS, $quote_style) ) );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user