From: Alexander Ebert Date: Thu, 22 Dec 2016 17:40:54 +0000 (+0100) Subject: Username escaping is no longer required X-Git-Tag: 3.0.0_RC_3~68 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17a1c70398a309f9dd3daad660e18ab90c1bab75;p=GitHub%2FWoltLab%2FWCF.git Username escaping is no longer required --- diff --git a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php index d381f1592a..037426e990 100644 --- a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php +++ b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php @@ -423,15 +423,14 @@ class MessageQuoteManager extends SingletonFactory { * @return string */ public function renderQuote(IMessage $message, $text, $renderAsString = true) { - $escapedUsername = str_replace(["\\", "'"], ["\\\\", "\'"], $message->getUsername()); $escapedLink = str_replace(["\\", "'"], ["\\\\", "\'"], $message->getLink()); if ($renderAsString) { - return "[quote='".$escapedUsername."','".$escapedLink."']".$text."[/quote]"; + return "[quote='".$message->getUsername()."','".$escapedLink."']".$text."[/quote]"; } else { return [ - 'username' => $escapedUsername, + 'username' => $message->getUsername(), 'link' => $escapedLink, 'text' => $text ];