From d3b8a484ef4e4a1b2245259e6bda953cb3d58afd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 23 Jul 2010 03:13:34 +0000 Subject: [PATCH] Fixed missing entity encoding (please test this) --- inc/functions.php | 4 ++-- inc/wrapper-functions.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index f50a594a58..0bff2a6abc 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2305,8 +2305,8 @@ function encodeUrl ($url, $outputMode = '0') { // Simple check for spider function isSpider () { - // Get the UA - $userAgent = strtolower(detectUserAgent(true)); + // Get the UA and trim it down + $userAgent = trim(strtolower(detectUserAgent(true))); // It should not be empty, if so it is better a spider/bot if (empty($userAgent)) return true; diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index cdc48f6c54..d8e0a2dcf8 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1049,7 +1049,7 @@ function isValidUserId ($userid) { // Encodes entities function encodeEntities ($str) { // Secure it first - $str = secureString($str); + $str = secureString($str, true, true); // Encode dollar sign as well $str = str_replace('$', '$', $str); -- 2.39.5