diff --git a/app/assets/javascripts/discourse/views/combobox_view_category.js b/app/assets/javascripts/discourse/views/combobox_view_category.js index ff82da6e1f4..f930212b8e6 100644 --- a/app/assets/javascripts/discourse/views/combobox_view_category.js +++ b/app/assets/javascripts/discourse/views/combobox_view_category.js @@ -10,16 +10,15 @@ Discourse.ComboboxViewCategory = Discourse.ComboboxView.extend({ none: 'category.none', classNames: ['combobox category-combobox'], overrideWidths: true, - dataAttributes: ['color', 'text_color', 'description'], + dataAttributes: ['name', 'color', 'text_color', 'description'], valueBinding: Ember.Binding.oneWay('source'), template: function(text, templateData) { if (!templateData.color) return text; - var result = "" + text + ""; + templateData.text_color + ";'>" + templateData.name + ""; if (templateData.description && templateData.description !== 'null') { - result += '
' + templateData.description + '
'; + result += '
' + Handlebars.Utils.escapeExpression(templateData.description) + '
'; } return result; }