mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Use preg_replace_callback instead of preg_replace with eval. Props beaulebens. see #8689
git-svn-id: https://develop.svn.wordpress.org/trunk@10339 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1317,8 +1317,7 @@ function wp_iso_descrambler($string) {
|
||||
return $string;
|
||||
} else {
|
||||
$subject = str_replace('_', ' ', $matches[2]);
|
||||
/** @todo use preg_replace_callback() */
|
||||
$subject = preg_replace('#\=([0-9a-f]{2})#ei', "chr(hexdec(strtolower('$1')))", $subject);
|
||||
$subject = preg_replace_callback('#\=([0-9a-f]{2})#i', create_function('$match', 'return chr(hexdec(strtolower($match[1])));'), $subject);
|
||||
return $subject;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user