Make WordPress Core


Ignore:
Timestamp:
01/09/2009 07:29:35 PM (16 years ago)
Author:
ryan
Message:

Use preg_replace_callback instead of preg_replace with eval. Props beaulebens. see #8689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r10269 r10339  
    224224    }
    225225    if ( $preview ) // preview fix for javascript bug with foreign languages
    226         $output =   preg_replace('/\%u([0-9A-F]{4,4})/e',   "'&#'.base_convert('\\1',16,10).';'", $output);
     226        $output =   preg_replace_callback('/\%u([0-9A-F]{4})/', create_function('$match', 'return "&#" . base_convert($match[1], 16, 10) . ";";'), $output);
    227227
    228228    return $output;
Note: See TracChangeset for help on using the changeset viewer.