Fixed xss lint issues for prod-1465/66

This commit is contained in:
Ahtisham Shahid
2020-07-21 14:40:39 +05:00
committed by Ali-D-Akbar
parent e14e944e86
commit 5d38314fc5
2 changed files with 10 additions and 14 deletions

View File

@@ -44,6 +44,7 @@ define(['jquery', 'underscore', 'backbone', 'gettext', 'js/utils/handle_iframe_b
this.options = options;
var _this = this;
// xss-lint: disable=javascript-jquery-insertion
this.render = _.wrap(this.render, function(render, options) {
_this.beforeRender();
render(options);

View File

@@ -74,16 +74,15 @@ function($, Backbone, _, Utils, FileUploader, gettext) {
return this;
}
template = _.template(tplHtml);
template = edx.HtmlUtils.template(tplHtml);
this.$el.find('.transcripts-status')
.removeClass('is-invisible')
.find(this.elClass).html(template({
component_locator: encodeURIComponent(this.component_locator),
html5_list: html5List,
grouped_list: groupedList,
subs_id: (params) ? params.subs : ''
}));
edx.HtmlUtils.setHtml(
this.$el.find('.transcripts-status').removeClass('is-invisible').find(this.elClass), template({
component_locator: encodeURIComponent(this.component_locator),
html5_list: html5List,
grouped_list: groupedList,
subs_id: (params) ? params.subs : ''
}));
this.fileUploader.render();
@@ -106,11 +105,7 @@ function($, Backbone, _, Utils, FileUploader, gettext) {
if (err) {
// Hide any other error messages.
this.hideError();
$error
.html(gettext(err))
.removeClass(this.invisibleClass);
edx.HtmlUtils.setHtml($error, gettext(err)).removeClass(this.invisibleClass);
if (hideButtons) {
this.$el.find('.wrapper-transcripts-buttons')
.addClass(this.invisibleClass);