From f9ebf06a6386a101c43466c4a9609f53cf291df1 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 28 Jul 2020 12:40:46 +0200 Subject: [PATCH] LSview: Fix validated URL generation --- src/includes/js/LSview.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/includes/js/LSview.js b/src/includes/js/LSview.js index d3a6bf41..c038780e 100644 --- a/src/includes/js/LSview.js +++ b/src/includes/js/LSview.js @@ -121,7 +121,9 @@ var LSview = new Class({ }, 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) { @@ -153,7 +155,9 @@ var LSview = new Class({ }, 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) {