Remove create_function usage during preview. See #14424 props ScottMac.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cec34630c8
commit
5169f2036c
|
@ -223,11 +223,23 @@ function get_the_content($more_link_text = null, $stripteaser = 0) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if ( $preview ) // preview fix for javascript bug with foreign languages
|
if ( $preview ) // preview fix for javascript bug with foreign languages
|
||||||
$output = preg_replace_callback('/\%u([0-9A-F]{4})/', create_function('$match', 'return "&#" . base_convert($match[1], 16, 10) . ";";'), $output);
|
$output = preg_replace_callback('/\%u([0-9A-F]{4})/', '__convert_urlencoded_to_entities', $output);
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preview fix for javascript bug with foreign languages
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
* @access private
|
||||||
|
* @param array $match Match array from preg_replace_callback
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
function __convert_urlencoded_to_entities($match) {
|
||||||
|
return '&#' . base_convert($match[1], 16, 10) . ';';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the post excerpt.
|
* Display the post excerpt.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue