diff --git a/app/assets/javascripts/discourse/app/helpers/dir-span.js b/app/assets/javascripts/discourse/app/helpers/dir-span.js index 83efafb63b..20bcd5e15c 100644 --- a/app/assets/javascripts/discourse/app/helpers/dir-span.js +++ b/app/assets/javascripts/discourse/app/helpers/dir-span.js @@ -13,7 +13,11 @@ function setDir(text) { return content; } -export default registerUnbound("dir-span", function (str, escapeText = true) { - let text = escapeText ? escapeExpression(str) : str; +export default registerUnbound("dir-span", function (str, params = {}) { + let isHtmlSafe = false; + if (params.htmlSafe) { + isHtmlSafe = params.htmlSafe; + } + let text = isHtmlSafe ? str : escapeExpression(str); return htmlSafe(setDir(text)); }); diff --git a/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs b/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs index b6145eb7ca..3c82c0b60e 100644 --- a/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs @@ -5,7 +5,7 @@ {{category-title-link category=category}} {{#if category.description_excerpt}}
{{dir-span category.description false}}
+{{dir-span category.description htmlSafe=true}}
{{/if}} {{/if}} diff --git a/app/assets/javascripts/select-kit/addon/templates/components/category-row.hbs b/app/assets/javascripts/select-kit/addon/templates/components/category-row.hbs index 77795727da..a21bf862e7 100644 --- a/app/assets/javascripts/select-kit/addon/templates/components/category-row.hbs +++ b/app/assets/javascripts/select-kit/addon/templates/components/category-row.hbs @@ -9,7 +9,7 @@ {{#if shouldDisplayDescription}} - + {{/if}} {{else}} {{html-safe label}}