From c0820771cd44a055cf858d5f7ffaff98e0cdc376 Mon Sep 17 00:00:00 2001 From: e107steved Date: Sat, 26 Feb 2011 23:07:36 +0000 Subject: [PATCH] Bugtracker #5128 - '$' not always detected in profanities --- e107_handlers/profanity_filter.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/e107_handlers/profanity_filter.php b/e107_handlers/profanity_filter.php index 5b3dc155a..d6e80e21b 100644 --- a/e107_handlers/profanity_filter.php +++ b/e107_handlers/profanity_filter.php @@ -2,16 +2,15 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2011 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * * - * $Source: /cvs_backup/e107_0.8/e107_handlers/profanity_filter.php,v $ - * $Revision$ - * $Date$ - * $Author$ + * $URL$ + * $Revision$ + * $Id$ */ if (!defined('e107_INIT')) { exit; } @@ -32,6 +31,10 @@ class e_profanityFilter if($word != "") { $word_array[] = $word; + if (strpos($word, '$') !== FALSE) + { + $word_array[] = str_replace('$', '\$', $word); // Special case - '$' may be 'in clear' or as entity + } } } if(count($word_array))