AJAX, cause you love it. Props mdawaffe. fixes #2561

git-svn-id: http://svn.automattic.com/wordpress/trunk@3660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2006-03-29 01:51:55 +00:00
parent ee60500f1f
commit baa30dd4d8
24 changed files with 595 additions and 445 deletions

View File

@@ -101,7 +101,9 @@ function wp_specialchars( $text, $quotes = 0 ) {
$text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $text);-
$text = str_replace('<', '&lt;', $text);
$text = str_replace('>', '&gt;', $text);
if ( $quotes ) {
if ( 'double' === $quotes ) {
$text = str_replace('"', '&quot;', $text);
} elseif ( $quotes ) {
$text = str_replace('"', '&quot;', $text);
$text = str_replace("'", '&#039;', $text);
}