Fixed missing entity encoding (please test this)
authorRoland Häder <roland@mxchange.org>
Fri, 23 Jul 2010 03:13:34 +0000 (03:13 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 23 Jul 2010 03:13:34 +0000 (03:13 +0000)
inc/functions.php
inc/wrapper-functions.php

index f50a594a58a21f8feec74f756c87a495a5cdd49c..0bff2a6abc57dfe89a0ba14a8ff8e2e1ee1162d0 100644 (file)
@@ -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;
index cdc48f6c5466c2e32e61e31b63d71417bbc56836..d8e0a2dcf82ff253d19af19f24f19ce9b9163665 100644 (file)
@@ -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('$', '&#36;', $str);