mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-18 14:21:25 +01:00
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:
parent
9187979859
commit
dd67f966fb
@ -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('<', '<', $text);
|
||||
$text = str_replace('>', '>', $text);
|
||||
if ( $quotes ) {
|
||||
@ -349,7 +349,7 @@ function convert_chars($content, $flag = 'obsolete') {
|
||||
$content = preg_replace('/<category>(.+?)<\/category>/','',$content);
|
||||
|
||||
// Converts lone & characters into & (a.k.a. &)
|
||||
$content = preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $content);
|
||||
$content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $content);
|
||||
|
||||
// Fix Word pasting
|
||||
$content = strtr($content, $wp_htmltranswinuni);
|
||||
|
Loading…
Reference in New Issue
Block a user