Skip to content

Commit

Permalink
Merge pull request #9475 from camptocamp/codeql-fix
Browse files Browse the repository at this point in the history
Fix DOM text reinterpreted as HTML
  • Loading branch information
sbrunner authored Sep 18, 2024
2 parents 42a9f95 + 2ef083c commit fa9bc6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/import/importdatasourceComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class Controller {
if (this.file) {
this.hasError = false;
// update the label
$(fileInput).next('.custom-file-label').html(this.fileNameAndSize);
$(fileInput).next('.custom-file-label').text(this.fileNameAndSize);
}
this.scope_.$apply();
});
Expand Down
5 changes: 3 additions & 2 deletions src/mobile/navigation/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ Controller.prototype.init = function (element) {
if (!datatarget) {
throw new Error('Missing datatarget');
}
const slideIn = $(datatarget);
if (slideIn.length != 1) {
const slideInFound = $.find(datatarget);
if (slideInFound.length != 1) {
throw new Error('Wrong slideIn');
}

const slideIn = $(slideInFound);
// slide the "new" element in
slideIn.addClass(CLASS_NAMES.ACTIVE);

Expand Down

0 comments on commit fa9bc6f

Please sign in to comment.