From 79eab529095361a002965a795d937d6f0d3cde43 Mon Sep 17 00:00:00 2001 From: azaozz Date: Sun, 21 Dec 2008 09:03:23 +0000 Subject: [PATCH] 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 --- wp-includes/compat.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-includes/compat.php b/wp-includes/compat.php index 9eb18d4db..aa5ab941a 100644 --- a/wp-includes/compat.php +++ b/wp-includes/compat.php @@ -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) ) ); + } +} + ?>