From: Alexander Ebert Date: Tue, 23 Jul 2013 18:26:46 +0000 (+0200) Subject: Fixed encoding issues with tags X-Git-Tag: 2.0.0_Beta_5~11^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8001577e18410f6f6425ab4b3948f0a0543fd2b9;p=GitHub%2FWoltLab%2FWCF.git Fixed encoding issues with tags --- 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]) }); } } }