WordPress.org

Make WordPress Core

Ticket #14245: 14245.patch

File 14245.patch, 711 bytes (added by hakre, 4 years ago)
  • wp-includes/post-template.php

     
    224224                } 
    225225 
    226226        } 
     227        static $callback; 
     228        ($callback === null) && ($callback = create_function('$match', 'return "&#" . base_convert($match[1], 16, 10) . ";";')); 
    227229        if ( $preview ) // preview fix for javascript bug with foreign languages 
    228                 $output =       preg_replace_callback('/\%u([0-9A-F]{4})/', create_function('$match', 'return "&#" . base_convert($match[1], 16, 10) . ";";'), $output); 
     230                $output =       preg_replace_callback('/\%u([0-9A-F]{4})/', $callback, $output); 
    229231 
    230232        return $output; 
    231233}