[Fusionforge-commits] r10999 - trunk/src/www/forum
Alain Peyrat
aljeux at libremir.placard.fr.eu.org
Thu Oct 14 21:58:42 CEST 2010
Author: aljeux
Date: 2010-10-14 21:58:42 +0200 (Thu, 14 Oct 2010)
New Revision: 10999
Modified:
trunk/src/www/forum/forum.php
Log:
Fix when html in message (forum).
Modified: trunk/src/www/forum/forum.php
===================================================================
--- trunk/src/www/forum/forum.php 2010-10-14 19:58:34 UTC (rev 10998)
+++ trunk/src/www/forum/forum.php 2010-10-14 19:58:42 UTC (rev 10999)
@@ -90,8 +90,11 @@
exit_error(_('Error getting new ForumMessage:'.' '.$fm->getErrorMessage()),'forums');
}
- $sanitizer = new TextSanitizer();
- $body = $sanitizer->SanitizeHtml($body);
+ if (getStringFromRequest('_body_content_type') == 'html') {
+ $body = TextSanitizer::purify($body);
+ } else {
+ $body = htmlspecialchars($body);
+ }
$attach = getUploadedFile("attachment1");
if ($attach['size']) {
More information about the Fusionforge-commits
mailing list