Fixed potential encoding issue
authorAlexander Ebert <ebert@woltlab.com>
Fri, 1 Nov 2013 11:15:56 +0000 (12:15 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 1 Nov 2013 11:15:56 +0000 (12:15 +0100)
com.woltlab.wcf/templates/messageQuoteList.tpl
wcfsetup/install/files/lib/system/message/quote/QuotedMessage.class.php

index 8f1a1132bc76389b2c121eafaec107f8dbb29567..e539a140956cc0619b1323a2d69af5a3f24bd115 100644 (file)
                                                                                        </span>
                                                                                        
                                                                                        <div class="jsQuote">
-                                                                                               <label for="quote_{@$quoteID}">{@$quote}</label>
+                                                                                               <label for="quote_{@$quoteID}">
+                                                                                                       {if $message->isFullQuote($quoteID)}
+                                                                                                               {@$quote}
+                                                                                                       {else}
+                                                                                                               {$quote}
+                                                                                                       {/if}
+                                                                                               </label>
                                                                                        </div>
                                                                                        <div class="jsFullQuote">
                                                                                                {$message->getFullQuote($quoteID)}
index cfa3be58e481a82a84a29cfa5c0026f36df93ff1..ba3baf9589a53d731c3d6ab8a75333bb555cb508 100644 (file)
@@ -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()
         */