Fixed mention detection causing the following word to be discarded
authorAlexander Ebert <ebert@woltlab.com>
Tue, 10 Mar 2015 14:15:59 +0000 (15:15 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 10 Mar 2015 14:15:59 +0000 (15:15 +0100)
wcfsetup/install/files/lib/system/event/listener/PreParserAtUserListener.class.php

index 435ad75f799f7e6357682fd56be2074af4e2896d..9a68014fc90454d7a2902f0261908aaadb00df00 100644 (file)
@@ -124,7 +124,7 @@ class PreParserAtUserListener implements IParameterizedEventListener {
                                                $mention = "[url='".$link."']@".$users[$username]->username.'[/url]';
                                                
                                                // check if only the part before the first space matched, in that case append the second word
-                                               if (isset($matches[2]) && $matches[2] == $username) {
+                                               if (isset($matches[2]) && strcasecmp($matches[2], $username) === 0) {
                                                        $mention .= mb_substr($matches[1], strlen($matches[2]));
                                                }