Fix highlighting of quotes in XML highlighter
authorTim Düsterhus <timwolla@googlemail.com>
Wed, 27 Nov 2013 14:20:28 +0000 (15:20 +0100)
committerTim Düsterhus <timwolla@googlemail.com>
Wed, 27 Nov 2013 14:20:28 +0000 (15:20 +0100)
wcfsetup/install/files/lib/system/bbcode/highlighter/XmlHighlighter.class.php

index 0a8ab5bb126199a0314de47b675b5b37fd5925ca..f016cf8881413e1ed2b4c3a374a2f751f2382b48 100644 (file)
@@ -75,16 +75,23 @@ class XmlHighlighter extends Highlighter {
         * @see \wcf\system\bbcode\highlighter\Highlighter::cacheQuotes()
         */
        protected function cacheQuotes($string) {
+               $string = parent::cacheQuotes($string);
+               
                // highlight CDATA-Tags as quotes
                $string = Regex::compile('<!\[CDATA\[.*?\]\]>', Regex::DOT_ALL)->replace($string, new Callback(function (array $matches) {
                        return StringStack::pushToStringStack('<span class="hlQuotes">'.StringUtil::encodeHTML($matches[0]).'</span>', 'highlighterQuotes');
                }));
                
-               $string = parent::cacheQuotes($string);
-               
                return $string;
        }
        
+       /**
+        * @see \wcf\system\bbcode\highlighter\Highlighter::highlightQuotes()
+        */
+       protected function highlightQuotes($string) {
+               return StringStack::reinsertStrings(parent::highlightQuotes($string), 'highlighterQuotes');
+       }
+       
        /**
         * @see \wcf\system\bbcode\highlighter\Highlighter::highlightNumbers()
         */