From 075dcb1ad50303c059ce8478103043e364b4fcab Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 1 Nov 2013 12:15:56 +0100 Subject: [PATCH] Fixed potential encoding issue --- com.woltlab.wcf/templates/messageQuoteList.tpl | 8 +++++++- .../system/message/quote/QuotedMessage.class.php | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/messageQuoteList.tpl b/com.woltlab.wcf/templates/messageQuoteList.tpl index 8f1a1132bc..e539a14095 100644 --- a/com.woltlab.wcf/templates/messageQuoteList.tpl +++ b/com.woltlab.wcf/templates/messageQuoteList.tpl @@ -32,7 +32,13 @@
- +
{$message->getFullQuote($quoteID)} diff --git a/wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php b/wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php index cfa3be58e4..ba3baf9589 100644 --- a/wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php +++ b/wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php @@ -97,6 +97,21 @@ class QuotedMessage implements \Countable, \Iterator { return null; } + /** + * Returns true if given quote id represents a full quote. + * + * @param string $quoteID + * @return boolean + */ + public function isFullQuote($quoteID) { + if (isset($this->fullQuotes[$quoteID]) && $this->quotes[$quoteID] != $this->fullQuotes[$quoteID]) { + // full quotes are parsed and differ from their original + return true; + } + + return false; + } + /** * @see \Countable::count() */ -- 2.20.1