diff options
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/text_helper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 9f13896ae..8a4460825 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -236,11 +236,11 @@ if ( ! function_exists('word_censor')) {
if ($replacement != '')
{
- $str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/i", $replacement, $str);
+ $str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")\b/i", $replacement, $str);
}
else
{
- $str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/ie", "str_repeat('#', strlen('\\1'))", $str);
+ $str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")\b/ie", "str_repeat('#', strlen('\\1'))", $str);
}
}
|