appdb/include filter.php
WineHQ
wineowner at wine.codeweavers.com
Mon Jul 17 21:42:57 CDT 2006
ChangeSet ID: 26603
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2006/07/17 21:42:57
Modified files:
include : filter.php
Log message:
Jonathan Ernst <jonathan at ernstfamily.ch>
Trim 's' and 'sh' variables in filter.php so we correctly convert variable values with spaces into "" strings
Patch: http://cvs.winehq.org/patch.py?id=26603
Old revision New revision Changes Path
1.7 1.8 +5 -2 appdb/include/filter.php
Index: appdb/include/filter.php
diff -u -p appdb/include/filter.php:1.7 appdb/include/filter.php:1.8
--- appdb/include/filter.php:1.7 18 Jul 2006 2:42:57 -0000
+++ appdb/include/filter.php 18 Jul 2006 2:42:57 -0000
@@ -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;
More information about the wine-cvs
mailing list