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