From 5c0fce308ecf149923611aab2db826db2af3d3b3 Mon Sep 17 00:00:00 2001 From: Azan Bin Zahid Date: Mon, 15 Mar 2021 15:00:34 +0500 Subject: [PATCH] PROD-2296 --- lms/static/js/discovery/views/filter_bar.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lms/static/js/discovery/views/filter_bar.js b/lms/static/js/discovery/views/filter_bar.js index 5f8ba9dc87..2bc0561075 100644 --- a/lms/static/js/discovery/views/filter_bar.js +++ b/lms/static/js/discovery/views/filter_bar.js @@ -5,8 +5,9 @@ 'backbone', 'gettext', 'js/discovery/models/filter', - 'js/discovery/views/filter_label' - ], function($, _, Backbone, gettext, Filter, FilterLabel) { + 'js/discovery/views/filter_label', + 'edx-ui-toolkit/js/utils/html-utils' + ], function($, _, Backbone, gettext, Filter, FilterLabel, HtmlUtils) { 'use strict'; return Backbone.View.extend({ @@ -20,7 +21,7 @@ }, initialize: function() { - this.tpl = _.template($(this.templateId).html()); + this.tpl = HtmlUtils.template($(this.templateId).html()); this.render(); this.listenTo(this.collection, 'remove', this.hideIfEmpty); this.listenTo(this.collection, 'add', this.addFilter); @@ -28,7 +29,10 @@ }, render: function() { - this.$el.html(this.tpl()); + HtmlUtils.setHtml( + this.$el, + this.tpl() + ); this.$ul = this.$el.find('ul'); this.$el.addClass('is-animated'); return this;