From e28c79f07032134720341fa40e43d2090a4c3763 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 22 Apr 2006 00:11:08 +0000 Subject: [PATCH] ent2ncr optimization. Props random. fixes #2548 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3742 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-formatting.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index 6f955e8bc4..9f8cdaf98a 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -997,10 +997,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) {