Make WordPress Core


Ignore:
Timestamp:
02/29/2008 06:28:32 PM (17 years ago)
Author:
ryan
Message:

Use preg_replace_callback instead of 'e' modifier. see #5644

File:
1 edited

Legend:

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

    r7106 r7107  
    826826 */
    827827function wp_kses_bad_protocol_once($string, $allowed_protocols) {
    828     return preg_replace('/^((&[^;]*;|[\sA-Za-z0-9])*)'.'(:|:|&#[Xx]3[Aa];)\s*/e', 'wp_kses_bad_protocol_once2("\\1", $allowed_protocols)', $string);
     828    global $_kses_allowed_protocols;
     829    $_kses_allowed_protocols = $allowed_protocols;
     830    return preg_replace_callback('/^((&[^;]*;|[\sA-Za-z0-9])*)'.'(:|:|&#[Xx]3[Aa];)\s*/', create_function('$matches', 'global $_kses_allowed_protocols; return wp_kses_bad_protocol_once2($matches[1], $_kses_allowed_protocols);'), $string);
    829831}
    830832
Note: See TracChangeset for help on using the changeset viewer.