Fixes various js security issues

This commit is contained in:
Matteo Biscosi 2023-04-05 16:43:10 +00:00
parent 3177d57089
commit 63caabfd17
13 changed files with 33 additions and 41 deletions

View file

@ -60,7 +60,6 @@ export class DataTableFiltersMenu {
this.extraAttributes = extraAttributes;
this.id = id;
this.url = url;
this.urlParams;
this.removeAllEntry = removeAllEntry;
this.callbackFunction = callbackFunction
}
@ -164,7 +163,7 @@ export class DataTableFiltersMenu {
} else {
self.urlParams = window.location.search
const newUrlParams = new URLSearchParams(self.urlParams)
newUrlParams.set(self.filterMenuKey, (typeof(filter.id) != undefined) ? filter.id : '')
newUrlParams.set(self.filterMenuKey, (typeof(filter.id) != "undefined") ? filter.id : '')
const newUrl = self.url + '?' + newUrlParams.toString()
window.history.pushState('', '', window.location.pathname + '?' + newUrlParams.toString())