Account for more letter entities, fixes #1431

git-svn-id: http://svn.automattic.com/wordpress/trunk@3056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-11-13 02:48:35 +00:00
parent 9187979859
commit dd67f966fb

View File

@ -41,7 +41,7 @@ function wptexturize($text) {
} else {
$next = true;
}
$curl = preg_replace('/&([^#])(?![a-z12]{1,8};)/', '&$1', $curl);
$curl = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $curl);
$output .= $curl;
}
return $output;
@ -98,7 +98,7 @@ function seems_utf8($Str) { # by bmorel at ssi dot fr
function wp_specialchars( $text, $quotes = 0 ) {
// Like htmlspecialchars except don't double-encode HTML entities
$text = preg_replace('/&([^#])(?![a-z12]{1,8};)/', '&$1', $text);-
$text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $text);-
$text = str_replace('<', '&lt;', $text);
$text = str_replace('>', '&gt;', $text);
if ( $quotes ) {
@ -349,7 +349,7 @@ function convert_chars($content, $flag = 'obsolete') {
$content = preg_replace('/<category>(.+?)<\/category>/','',$content);
// Converts lone & characters into &#38; (a.k.a. &amp;)
$content = preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $content);
$content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&#038;$1', $content);
// Fix Word pasting
$content = strtr($content, $wp_htmltranswinuni);