Fixed encoding issues with tags
authorAlexander Ebert <ebert@woltlab.com>
Tue, 23 Jul 2013 18:26:46 +0000 (20:26 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 23 Jul 2013 18:26:46 +0000 (20:26 +0200)
com.woltlab.wcf/templates/tagInput.tpl
wcfsetup/install/files/js/WCF.Tagging.js

index 8cea3fecc770c2ffbd63db35df227a40298f8b04..d28cbe5b6541622c3f083d10454665930d3e0cd4 100644 (file)
@@ -13,7 +13,7 @@
                var $tagList = new WCF.Tagging.TagList('#tagList{if $tagInputSuffix|isset}{@$tagInputSuffix}{/if}', '#tagSearchInput{if $tagInputSuffix|isset}{@$tagInputSuffix}{/if}', {@TAGGING_MAX_TAG_LENGTH});
                
                {if $tags|isset && $tags|count}
-                       $tagList.load([ {implode from=$tags item=tag}'{$tag}'{/implode} ]);
+                       $tagList.load([ {implode from=$tags item=tag}'{$tag|encodeJS}'{/implode} ]);
                {/if}
        });
        //]]>
index a74adb1b2fcf38f3c4530869bbcbe05f733aed6d..5b3e824d1dbd6b6ccc2f2ad3bee88480a1208c4e 100644 (file)
@@ -126,7 +126,7 @@ WCF.Tagging.TagList = WCF.EditableItemList.extend({
        load: function(data) {
                if (data && data.length) {
                        for (var $i = 0, $length = data.length; $i < $length; $i++) {
-                               this.addItem({ objectID: 0, label: data[$i] });
+                               this.addItem({ objectID: 0, label: WCF.String.unescapeHTML(data[$i]) });
                        }
                }
        }