WordPress.org

Make WordPress Core

Changeset 13988


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

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

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r13761 r13988  
    24612461    return count_user_posts( $userid );
    24622462}
     2463
     2464/**
     2465 * Callback used to change %uXXXX to &#YYY; syntax
     2466 *
     2467 * @since 2.8.0
     2468 * @access private
     2469 * @deprecated 3.0.0
     2470 *
     2471 * @param array $matches Single Match
     2472 * @return string An HTML entity
     2473 */
     2474function funky_javascript_callback($matches) {
     2475    return "&#".base_convert($matches[1],16,10).";";
     2476}
     2477
     2478/**
     2479 * Fixes javascript bugs in browsers.
     2480 *
     2481 * Converts unicode characters to HTML numbered entities.
     2482 *
     2483 * @since 1.5.0
     2484 * @uses $is_macIE
     2485 * @uses $is_winIE
     2486 * @deprecated 3.0.0
     2487 *
     2488 * @param string $text Text to be made safe.
     2489 * @return string Fixed text.
     2490 */
     2491function funky_javascript_fix($text) {
     2492    _deprecated_function( __FUNCTION__, '3.0' );
     2493    // Fixes for browsers' javascript bugs
     2494    global $is_macIE, $is_winIE;
     2495
     2496    if ( $is_winIE || $is_macIE )
     2497        $text =  preg_replace_callback("/\%u([0-9A-F]{4,4})/",
     2498                    "funky_javascript_callback",
     2499                    $text);
     2500
     2501    return $text;
     2502}
  • 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.