ent2ncr optimization. Props random. fixes #2548
git-svn-id: https://develop.svn.wordpress.org/trunk@3641 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9f23849f9c
commit
2216ca5092
|
@ -1001,10 +1001,7 @@ function ent2ncr($text) {
|
|||
'♦' => '♦'
|
||||
);
|
||||
|
||||
foreach ($to_ncr as $entity => $ncr) {
|
||||
$text = str_replace($entity, $ncr, $text);
|
||||
}
|
||||
return $text;
|
||||
return str_replace( array_keys($to_ncr), array_values($to_ncr), $text );
|
||||
}
|
||||
|
||||
function wp_richedit_pre($text) {
|
||||
|
|
Loading…
Reference in New Issue