diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 4a5fc1c746..a4c3b9307a 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -2459,4 +2459,44 @@ function get_profile( $field, $user = false ) { function get_usernumposts( $userid ) { _deprecated_function( __FUNCTION__, '3.0', 'count_user_posts()' ); return count_user_posts( $userid ); -} \ No newline at end of file +} + +/** + * Callback used to change %uXXXX to &#YYY; syntax + * + * @since 2.8.0 + * @access private + * @deprecated 3.0.0 + * + * @param array $matches Single Match + * @return string An HTML entity + */ +function funky_javascript_callback($matches) { + return "&#".base_convert($matches[1],16,10).";"; +} + +/** + * Fixes javascript bugs in browsers. + * + * Converts unicode characters to HTML numbered entities. + * + * @since 1.5.0 + * @uses $is_macIE + * @uses $is_winIE + * @deprecated 3.0.0 + * + * @param string $text Text to be made safe. + * @return string Fixed text. + */ +function funky_javascript_fix($text) { + _deprecated_function( __FUNCTION__, '3.0' ); + // Fixes for browsers' javascript bugs + global $is_macIE, $is_winIE; + + if ( $is_winIE || $is_macIE ) + $text = preg_replace_callback("/\%u([0-9A-F]{4,4})/", + "funky_javascript_callback", + $text); + + return $text; +} diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 034f5b8191..dcd92fcb5a 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -954,42 +954,6 @@ function convert_chars($content, $deprecated = '') { return $content; } -/** - * Callback used to change %uXXXX to &#YYY; syntax - * - * @since 2.8? - * - * @param array $matches Single Match - * @return string An HTML entity - */ -function funky_javascript_callback($matches) { - return "&#".base_convert($matches[1],16,10).";"; -} - -/** - * Fixes javascript bugs in browsers. - * - * Converts unicode characters to HTML numbered entities. - * - * @since 1.5.0 - * @uses $is_macIE - * @uses $is_winIE - * - * @param string $text Text to be made safe. - * @return string Fixed text. - */ -function funky_javascript_fix($text) { - // Fixes for browsers' javascript bugs - global $is_macIE, $is_winIE; - - if ( $is_winIE || $is_macIE ) - $text = preg_replace_callback("/\%u([0-9A-F]{4,4})/", - "funky_javascript_callback", - $text); - - return $text; -} - /** * Will only balance the tags if forced to and the option is set to balance tags. *