Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r10392 r10150  
    395395 */
    396396function wp_kses_split($string, $allowed_html, $allowed_protocols) {
    397     global $pass_allowed_html, $pass_allowed_protocols;
    398     $pass_allowed_html = $allowed_html;
    399     $pass_allowed_protocols = $allowed_protocols;
    400     return preg_replace_callback('%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%',
    401         create_function('$match', 'global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2($match[1], $pass_allowed_html, $pass_allowed_protocols);'), $string);
     397    return preg_replace('%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%e',
     398    "wp_kses_split2('\\1', \$allowed_html, ".'$allowed_protocols)', $string);
    402399}
    403400
     
    10031000 */
    10041001function wp_kses_decode_entities($string) {
    1005     $string = preg_replace_callback('/&#([0-9]+);/', create_function('$match', 'return chr($match[1]);'), $string);
    1006     $string = preg_replace_callback('/&#[Xx]([0-9A-Fa-f]+);/', create_function('$match', 'return chr(hexdec($match[1]));'), $string);
     1002    $string = preg_replace('/&#([0-9]+);/e', 'chr("\\1")', $string);
     1003    $string = preg_replace('/&#[Xx]([0-9A-Fa-f]+);/e', 'chr(hexdec("\\1"))', $string);
    10071004
    10081005    return $string;
Note: See TracChangeset for help on using the changeset viewer.