cvs: phpweb / submit-event.php
| From: | jim winstead | Date: | Thu, 02 May 2002 19:44:50 +0000 |
| Subject: | cvs: phpweb / submit-event.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-10009@lists.php.net to get a copy of this message | ||
jimw Thu May 2 15:44:50 2002 EDT
Modified files:
/phpweb submit-event.php
Log:
restrict html allowed in long description. (other fields are treated as plaintext and run through
htmlentities() before they are output.)
Index: phpweb/submit-event.php
diff -u phpweb/submit-event.php:1.9 phpweb/submit-event.php:1.10
--- phpweb/submit-event.php:1.9 Thu May 2 14:03:44 2002
+++ phpweb/submit-event.php Thu May 2 15:44:50 2002
@@ -26,7 +26,8 @@
$errors[] = "You must supply a short description of the event.";
}
- $in['ldesc'] = trim($in['ldesc']);
+ $in['ldesc'] =
trim(strip_tags($in['ldesc'],'<a><i><b><br><p>'));
+ $in['ldesc'] =
preg_replace("/(style|on\\w+?)\s*=\s*(\"|').+?\\2/i","",$in['ldesc']);
if (!$in['ldesc']) {
$errors[] = "You must supply a long description of the event.";
}