From 8001577e18410f6f6425ab4b3948f0a0543fd2b9 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 23 Jul 2013 20:26:46 +0200 Subject: [PATCH] Fixed encoding issues with tags --- com.woltlab.wcf/templates/tagInput.tpl | 2 +- wcfsetup/install/files/js/WCF.Tagging.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/templates/tagInput.tpl b/com.woltlab.wcf/templates/tagInput.tpl index 8cea3fecc7..d28cbe5b65 100644 --- a/com.woltlab.wcf/templates/tagInput.tpl +++ b/com.woltlab.wcf/templates/tagInput.tpl @@ -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} }); //]]> diff --git a/wcfsetup/install/files/js/WCF.Tagging.js b/wcfsetup/install/files/js/WCF.Tagging.js index a74adb1b2f..5b3e824d1d 100644 --- a/wcfsetup/install/files/js/WCF.Tagging.js +++ b/wcfsetup/install/files/js/WCF.Tagging.js @@ -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]) }); } } } -- 2.20.1