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
@ -24,7 +24,8 @@ class WordFilter extends Extension {
|
|||||||
private function filter($text) {
|
private function filter($text) {
|
||||||
$map = $this->get_map();
|
$map = $this->get_map();
|
||||||
foreach($map as $search => $replace) {
|
foreach($map as $search => $replace) {
|
||||||
$text = str_replace($search, $replace, $text);
|
$search = "/\\b$search\\b/i";
|
||||||
|
$text = preg_replace($search, $replace, $text);
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user