Ampersand fixer should be called outside of the texturize loop.

git-svn-id: http://svn.automattic.com/wordpress/trunk@174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-06-06 21:19:30 +00:00
parent f9ed08d4c8
commit 67b6947894
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,6 @@ function wptexturize($text) {
$curl = preg_replace("/\(r\)/i", '®', $curl); $curl = preg_replace("/\(r\)/i", '®', $curl);
$curl = str_replace("''", '”', $curl); $curl = str_replace("''", '”', $curl);
$curl = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $curl);
$curl = preg_replace('/(d+)x(\d+)/', "$1×$2", $curl); $curl = preg_replace('/(d+)x(\d+)/', "$1×$2", $curl);
@ -82,6 +81,8 @@ function wpautop($pee, $br=1) {
$pee = preg_replace('!(</?(?:table|ul|ol|li|pre|select|form|blockquote|p)>)<br />!', "$1", $pee); $pee = preg_replace('!(</?(?:table|ul|ol|li|pre|select|form|blockquote|p)>)<br />!', "$1", $pee);
$pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee); $pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee);
$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee); $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
$pee = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $pee);
return $pee; return $pee;
} }