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:
Ryan Boren 2006-03-14 02:48:36 +00:00
parent 9f23849f9c
commit 2216ca5092
1 changed files with 1 additions and 4 deletions

View File

@ -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) {