htmlspecialchars_decode() for php versions less than 5.1, props sivel, fixes #8679
git-svn-id: https://develop.svn.wordpress.org/trunk@10236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9f66fcd434
commit
64f41a22fb
@ -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