mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-03-13 08:38:58 -05:00
Merge pull request #5300 from Roardom/bbcode-censor
(Fix) Censor changing case of censored words
This commit is contained in:
@@ -287,7 +287,7 @@ class Bbcode
|
||||
|
||||
// Censor words
|
||||
foreach (config('censor.redact', []) as $word) {
|
||||
$source = preg_replace("/\b{$word}(?=[.,]|$|\s)/mi", "<span class='censor'>{$word}</span>", (string) $source);
|
||||
$source = preg_replace("/\b({$word})(?=[.,]|$|\s)/mi", "<span class='censor'>$1</span>", (string) $source);
|
||||
}
|
||||
|
||||
foreach (config('censor.replace', []) as $word => $replacementWord) {
|
||||
|
||||
Reference in New Issue
Block a user