Trim 's' and 'sh' variables in filter.php so we correctly convert variable values with spaces into "" strings
This commit is contained in:
@@ -32,10 +32,13 @@ function filter_gpc()
|
||||
switch($aKeys[$i][1])
|
||||
{
|
||||
case "h": // HTML string
|
||||
$aClean[$aKeys[$i]] = htmlspecialchars($_REQUEST[$aKeys[$i]]);
|
||||
$aClean[$aKeys[$i]] = trim(htmlspecialchars($_REQUEST[$aKeys[$i]]));
|
||||
// if there is no content and no image, make the variable empty
|
||||
if(strip_tags($aClean[$aKeys[$i]],'<img>')=="")
|
||||
$aClean[$aKeys[$i]] = "";
|
||||
break;
|
||||
default: // normal string (no HTML)
|
||||
$aClean[$aKeys[$i]] = strip_tags($_REQUEST[$aKeys[$i]]);
|
||||
$aClean[$aKeys[$i]] = trim(strip_tags($_REQUEST[$aKeys[$i]]));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user