From 9750e22712b32936b061694db37e5c9188aef73e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 6 Nov 2009 15:26:30 +0000 Subject: [PATCH] Fixes for double-quoting --- inc/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 0d11b7f068..00fa83fa9c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3565,7 +3565,7 @@ function linenumberCode ($code) { $r .= '|'; // Add code - $r .= '' . secureString($c) . ''; + $r .= '' . htmlentities($c) . ''; } return '
' . $r . '
'; @@ -3684,8 +3684,8 @@ function escapeQuotes ($str, $single = false) { // Escape all (including null) $str = addslashes($str); } else { - // Escape only double-quotes - $str = str_replace('"', "\\\"", $str); + // Escape only double-quotes but prevent double-quoting + $str = stripslashes(str_replace('"', "\\\"", $str)); } // Return the escaped string -- 2.39.5