LSview: Fix validated URL generation

This commit is contained in:
Benjamin Renard 2020-07-28 12:40:46 +02:00
parent 7eac609bd9
commit f9ebf06a63

View file

@ -121,7 +121,9 @@ var LSview = new Class({
}, },
removeFromA: function(a) { removeFromA: function(a) {
document.location = a.href+'?valid'; var validatedURL = new URL(a.href);
validatedURL.searchParams.set('valid', '1');
document.location = validatedURL.href;
}, },
onCustomActionBtnClick: function(event,a) { onCustomActionBtnClick: function(event,a) {
@ -153,7 +155,9 @@ var LSview = new Class({
}, },
executeCustomActionFromA: function(a) { executeCustomActionFromA: function(a) {
document.location = a.href+'&valid'; var validatedURL = new URL(a.href);
validatedURL.searchParams.set('valid', '1');
document.location = validatedURL.href;
}, },
toggleLSviewActions: function(ul) { toggleLSviewActions: function(ul) {