replace words

git-svn-id: file:///home/shish/svn/shimmie2/trunk@697 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-01-19 17:21:33 +00:00
parent f38da63bca
commit 1bdfb285c1

View file

@ -24,7 +24,8 @@ class WordFilter extends Extension {
private function filter($text) {
$map = $this->get_map();
foreach($map as $search => $replace) {
$text = str_replace($search, $replace, $text);
$search = "/\\b$search\\b/i";
$text = preg_replace($search, $replace, $text);
}
return $text;
}