ent2ncr optimization. Props random. fixes #2548

git-svn-id: http://svn.automattic.com/wordpress/trunk@3641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-03-14 02:48:36 +00:00
parent 5b10d4b1e0
commit 898d025430

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