Skip to content

Commit

Permalink
fix: failing xss-lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Syed-Ali-Abbas-Zaidi committed May 11, 2023
1 parent 4d05181 commit b15f474
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cms/static/js/views/baseview.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ function($, _, Backbone, gettext, IframeUtils, TemplateUtils, ViewUtils) {

var _this = this;
// xss-lint: disable=javascript-jquery-insertion
// eslint-disable-next-line no-shadow
this.render = _.wrap(this.render, function(render, options) {
this.render = _.wrap(this.render, function(render, options) { // eslint-disable-line no-shadow
_this.beforeRender();
render(options);
_this.afterRender();
Expand Down
2 changes: 1 addition & 1 deletion common/static/js/capa/schematicinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ $(function() {
// TODO: someone should fix all of this...
// $("a[rel*=leanModal]").leanModal(); //TODO: Make this work with the new modal library. Try and integrate this with the "slices"

/* eslint-disable no-multi-str */
// xss-lint: disable=javascript-jquery-append
// eslint-disable-next-line no-multi-str
$('body').append('\
<div id="circuit_editor_modal" class="modal hide fade"> \
<div class="modal-body"> \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@
// inner function generate div and display response messages.
$('<div/>', {
class: 'message ' + group
}).appendTo('.bulk-exception-results').prepend( // eslint-disable-line max-len, xss-lint: disable=javascript-jquery-insert-into-target,javascript-jquery-prepend
"<button type='button' id= '" + group + "' class='arrow'> + </button>" + heading) // eslint-disable-line max-len, xss-lint: disable=javascript-concat-html
}).appendTo('.bulk-exception-results').prepend( // xss-lint: disable=javascript-jquery-insert-into-target,javascript-jquery-prepend
"<button type='button' id= '" + group + "' class='arrow'> + </button>" + heading) // xss-lint: disable=javascript-concat-html
.append($('<ul/>', {
class: group
}));

for (var i = 0; i < displayData.length; i++) { // eslint-disable-line vars-on-top
$('<li/>', {
text: displayData[i]
}).appendTo('div.message > .' + group); // eslint-disable-line max-len, xss-lint: disable=javascript-jquery-insert-into-target
}).appendTo('div.message > .' + group); // xss-lint: disable=javascript-jquery-insert-into-target
}
$('div.message > .' + group).hide();
}
Expand Down

0 comments on commit b15f474

Please sign in to comment.