Fix amp handling. Props skeltoac. fixes #3328
git-svn-id: http://svn.automattic.com/wordpress/trunk@4451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1977863614
commit
a5b7a24962
|
@ -109,7 +109,9 @@ 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-z1-4]{1,8};)/', '&$1', $text);
|
||||
$text = str_replace('&&', '&&', $text);
|
||||
$text = str_replace('&&', '&&', $text);
|
||||
$text = preg_replace('/&(?:$|([^#])(?![a-z1-4]{1,8};))/', '&$1', $text);
|
||||
$text = str_replace('<', '<', $text);
|
||||
$text = str_replace('>', '>', $text);
|
||||
if ( 'double' === $quotes ) {
|
||||
|
|
Loading…
Reference in New Issue