From: Alexander Ebert Date: Fri, 18 Aug 2023 15:03:19 +0000 (+0200) Subject: Revert "Fix the handling of mentions with and without leading @" X-Git-Tag: 6.0.0_Beta_2~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a7c4b3cbf6a8a75d941075ce6af29a916ab0402;p=GitHub%2FWoltLab%2FWCF.git Revert "Fix the handling of mentions with and without leading @" This reverts commit f8439040815b5ab34fc3525a3937073430af4114. --- diff --git a/com.woltlab.wcf/templates/userBBCodeTag.tpl b/com.woltlab.wcf/templates/userBBCodeTag.tpl index 369371df25..dbe32b29d2 100644 --- a/com.woltlab.wcf/templates/userBBCodeTag.tpl +++ b/com.woltlab.wcf/templates/userBBCodeTag.tpl @@ -1,6 +1,6 @@ {if $userProfile === null} {* user no longer exists, use plain output rather than using a broken link *} - {$username}{* no newline after the tag + @{$username}{* no newline after the tag *}{else} {@$userProfile->getFormattedUsername()}{* no newline after the tag *}{/if} diff --git a/wcfsetup/install/files/acp/templates/userBBCodeTag.tpl b/wcfsetup/install/files/acp/templates/userBBCodeTag.tpl index 369371df25..dbe32b29d2 100644 --- a/wcfsetup/install/files/acp/templates/userBBCodeTag.tpl +++ b/wcfsetup/install/files/acp/templates/userBBCodeTag.tpl @@ -1,6 +1,6 @@ {if $userProfile === null} {* user no longer exists, use plain output rather than using a broken link *} - {$username}{* no newline after the tag + @{$username}{* no newline after the tag *}{else} {@$userProfile->getFormattedUsername()}{* no newline after the tag *}{/if} diff --git a/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php index 0b0d4c290b..d96c4b5d2e 100644 --- a/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/UserBBCode.class.php @@ -21,10 +21,6 @@ final class UserBBCode extends AbstractBBCode */ public function getParsedTag(array $openingTag, $content, array $closingTag, BBCodeParser $parser): string { - if (!\str_starts_with($content, "@")) { - $content = "@{$content}"; - } - $userID = (!empty($openingTag['attributes'][0])) ? \intval($openingTag['attributes'][0]) : 0; if (!$userID) { return "[user]{$content}[/user]";