Changeset 7107

Show
Ignore:
Timestamp:
02/29/08 18:28:32 (9 months ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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