From 85dc9d45c1540a35c9f1b4e2f33e7825becbd489 Mon Sep 17 00:00:00 2001
From: "Paul S. Owen" <psotfx@users.sourceforge.net>
Date: Mon, 4 Mar 2002 13:43:35 +0000
Subject: [PATCH] preg_quote badword ... don't use # in your bad word list(!)

git-svn-id: file:///svn/phpbb/trunk@2263 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/includes/functions.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index f75a9ad941..c6bff2ce34 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -717,7 +717,7 @@ function obtain_word_list(&$orig_word, &$replacement_word)
 	{
 		do 
 		{
-			$orig_word[] = "#\b(" . str_replace("*", "\w*?", $row['word']) . ")\b#is";
+			$orig_word[] = "#\b(" . str_replace("\*", "\w*?", preg_quote($row['word'])) . ")\b#is";
 			$replacement_word[] = $row['replacement'];
 		}
 		while ( $row = $db->sql_fetchrow($result) );