diff options
Diffstat (limited to 'wp-includes/formatting.php')
-rw-r--r-- | wp-includes/formatting.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 61cd1b2..7d52ed9 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1044,6 +1044,8 @@ function htmlentities2($myHTML) { // Escape single quotes, specialchar double quotes, and fix line endings. function js_escape($text) { $text = wp_specialchars($text, 'double'); - return preg_replace("/\r?\n/", "\\n", addslashes($text)); + $text = str_replace(''', "'", $text); + return preg_replace("/\r?\n/", "\\n", addslashes($text)); } + ?> |