PROD-2244

This commit is contained in:
azanbinzahid
2020-11-25 13:55:31 +05:00
parent 09f55b8db6
commit 7d42bd225c

View File

@@ -4,8 +4,9 @@
'underscore',
'backbone',
'gettext',
'edx-ui-toolkit/js/utils/date-utils'
], function($, _, Backbone, gettext, DateUtils) {
'edx-ui-toolkit/js/utils/date-utils',
'edx-ui-toolkit/js/utils/html-utils'
], function($, _, Backbone, gettext, DateUtils, HtmlUtils) {
'use strict';
function formatDate(date, userLanguage, userTimezone) {
@@ -26,7 +27,7 @@
className: 'courses-listing-item',
initialize: function() {
this.tpl = _.template($(this.templateId).html());
this.tpl = HtmlUtils.template($(this.templateId).html());
},
render: function() {
@@ -51,7 +52,10 @@
userLanguage,
userTimezone
);
this.$el.html(this.tpl(data));
HtmlUtils.setHtml(
this.$el,
this.tpl(data)
);
return this;
}