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:
parent
f9ed08d4c8
commit
67b6947894
|
@ -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};)/', '&$1', $pee);
|
||||||
|
|
||||||
return $pee;
|
return $pee;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue