From: Matthias Schmidt Date: Sat, 16 Mar 2013 15:00:04 +0000 (+0100) Subject: Fixes allowed BBCode issues X-Git-Tag: 2.0.0_Beta_1~88^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a0e61bb046c0d79a68a86978139986218c86e6f;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Fixes allowed BBCode issues Closes #57 --- diff --git a/files/lib/data/conversation/message/ConversationMessageAction.class.php b/files/lib/data/conversation/message/ConversationMessageAction.class.php index 2e9ccb1..1fcdb9d 100644 --- a/files/lib/data/conversation/message/ConversationMessageAction.class.php +++ b/files/lib/data/conversation/message/ConversationMessageAction.class.php @@ -8,6 +8,7 @@ use wcf\data\IExtendedMessageQuickReplyAction; use wcf\data\IMessageInlineEditorAction; use wcf\data\IMessageQuoteAction; use wcf\system\bbcode\BBCodeParser; +use wcf\system\bbcode\PreParser; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\UserInputException; use wcf\system\message\censorship\Censorship; @@ -195,6 +196,7 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements * @see wcf\data\IMessageQuickReply::validateQuickReply() */ public function validateQuickReply() { + QuickReplyManager::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.allowedBBCodes'))); QuickReplyManager::getInstance()->validateParameters($this, $this->parameters, 'wcf\data\conversation\Conversation'); } @@ -337,7 +339,7 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements public function save() { $messageEditor = new ConversationMessageEditor($this->message); $messageEditor->update(array( - 'message' => $this->parameters['data']['message'] + 'message' => PreParser::getInstance()->parse($this->parameters['data']['message'], explode(',', WCF::getSession()->getPermission('user.message.allowedBBCodes'))) )); // load new message