client/tags: fix escaping HTML in autocomplete

Fixes #105
This commit is contained in:
rr- 2016-10-02 20:10:38 +02:00
parent b853caf6f5
commit 419deca894

View file

@ -24,8 +24,7 @@ class TagAutoCompleteControl extends AutoCompleteControl {
return kv2[1].usages - kv1[1].usages; return kv2[1].usages - kv1[1].usages;
}) })
.map(kv => { .map(kv => {
const origName = misc.escapeHtml( const origName = tags.getOriginalTagName(kv[0]);
tags.getOriginalTagName(kv[0]));
const category = kv[1].category; const category = kv[1].category;
const usages = kv[1].usages; const usages = kv[1].usages;
let cssName = misc.makeCssName(category, 'tag'); let cssName = misc.makeCssName(category, 'tag');
@ -35,7 +34,7 @@ class TagAutoCompleteControl extends AutoCompleteControl {
return { return {
caption: misc.unindent` caption: misc.unindent`
<span class="${cssName}"> <span class="${cssName}">
${origName} (${usages}) ${misc.escapeHtml(origName)} (${usages})
</span>`, </span>`,
value: origName, value: origName,
}; };