Make WordPress Core


Ignore:
Timestamp:
04/04/2010 07:11:23 AM (15 years ago)
Author:
nacin
Message:

Deprecate funky_javascript_fix() and it's callback. fixes #12520.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r13983 r13988  
    953953
    954954    return $content;
    955 }
    956 
    957 /**
    958  * Callback used to change %uXXXX to &#YYY; syntax
    959  *
    960  * @since 2.8?
    961  *
    962  * @param array $matches Single Match
    963  * @return string An HTML entity
    964  */
    965 function funky_javascript_callback($matches) {
    966     return "&#".base_convert($matches[1],16,10).";";
    967 }
    968 
    969 /**
    970  * Fixes javascript bugs in browsers.
    971  *
    972  * Converts unicode characters to HTML numbered entities.
    973  *
    974  * @since 1.5.0
    975  * @uses $is_macIE
    976  * @uses $is_winIE
    977  *
    978  * @param string $text Text to be made safe.
    979  * @return string Fixed text.
    980  */
    981 function funky_javascript_fix($text) {
    982     // Fixes for browsers' javascript bugs
    983     global $is_macIE, $is_winIE;
    984 
    985     if ( $is_winIE || $is_macIE )
    986         $text =  preg_replace_callback("/\%u([0-9A-F]{4,4})/",
    987                            "funky_javascript_callback",
    988                            $text);
    989 
    990     return $text;
    991955}
    992956
Note: See TracChangeset for help on using the changeset viewer.