replace words
git-svn-id: file:///home/shish/svn/shimmie2/trunk@697 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
f38da63bca
commit
1bdfb285c1
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Reference in a new issue