From 419deca89439967deed515ce365584d6c0e1203a Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 2 Oct 2016 20:10:38 +0200 Subject: [PATCH] client/tags: fix escaping HTML in autocomplete Fixes #105 --- client/js/controls/tag_auto_complete_control.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/js/controls/tag_auto_complete_control.js b/client/js/controls/tag_auto_complete_control.js index e536da17..47434c7d 100644 --- a/client/js/controls/tag_auto_complete_control.js +++ b/client/js/controls/tag_auto_complete_control.js @@ -24,8 +24,7 @@ class TagAutoCompleteControl extends AutoCompleteControl { return kv2[1].usages - kv1[1].usages; }) .map(kv => { - const origName = misc.escapeHtml( - tags.getOriginalTagName(kv[0])); + const origName = tags.getOriginalTagName(kv[0]); const category = kv[1].category; const usages = kv[1].usages; let cssName = misc.makeCssName(category, 'tag'); @@ -35,7 +34,7 @@ class TagAutoCompleteControl extends AutoCompleteControl { return { caption: misc.unindent` - ${origName} (${usages}) + ${misc.escapeHtml(origName)} (${usages}) `, value: origName, };