Fixed testing for censored words containing delimiters
authorAlexander Ebert <ebert@woltlab.com>
Tue, 10 Mar 2015 14:54:51 +0000 (15:54 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 10 Mar 2015 14:54:51 +0000 (15:54 +0100)
wcfsetup/install/files/lib/system/message/censorship/Censorship.class.php

index fc2b7ac5268beafdf147964e3173cd6371753415..55f8866c545aa31fd415d06433a9ba3f11390fb2 100644 (file)
@@ -55,7 +55,7 @@ class Censorship extends SingletonFactory {
                        $displayedCensoredWord = str_replace(array('~', '*'), '', $censoredWord);
                        
                        // check if censored word contains at least one delimiter
-                       if (preg_match('!'.$this->delimiters.'+!', $censoredWord)) {
+                       if (preg_match('!'.$this->delimiters.'+!', $displayedCensoredWord)) {
                                // remove delimiters
                                $censoredWord = preg_replace('!'.$this->delimiters.'!', '', $censoredWord);