Merge pull request #640 from mapado/nr-fix_js_errors

Quickfix : Small fixes in JS
This commit is contained in:
Amauri CHAMPEAUX 2021-04-01 12:12:19 +02:00 committed by GitHub
commit 6ea5dff1ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1655,8 +1655,7 @@ var tarteaucitron = {
}
},
"fixSelfXSS": function(html) {
fixed = html.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
return fixed;
return html.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
},
"getLanguage": function () {
"use strict";
@ -1936,6 +1935,7 @@ var tarteaucitron = {
},
"triggerJobsAfterAjaxCall": function() {
tarteaucitron.job.forEach(function(e) { tarteaucitron.job.push(e) });
var i;
var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
for (i = 0; i < allowBtns.length; i++) {
tarteaucitron.addClickEventToElement(allowBtns[i], function () {