From f3ac4d5f6e75cf7aabb0a358dfca92291e39a7a6 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Thu, 31 Oct 2024 09:37:37 +0700 Subject: [PATCH] Correctly handle hash in URL for productlist caching (#2545) --- .../templates/modules/mod_iso_productlist_caching.html5 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/system/modules/isotope/templates/modules/mod_iso_productlist_caching.html5 b/system/modules/isotope/templates/modules/mod_iso_productlist_caching.html5 index f04790e2ca..4a169456b2 100644 --- a/system/modules/isotope/templates/modules/mod_iso_productlist_caching.html5 +++ b/system/modules/isotope/templates/modules/mod_iso_productlist_caching.html5 @@ -12,10 +12,11 @@ (function() { Isotope.displayBox('message ?>'); - var url = window.location.href + (document.location.search ? '&' : '?') + '&buildCache=1', - xhr = new XMLHttpRequest(); + var url = new URL(window.location.href); + url.searchParams.set('buildCache', '1'); - xhr.open('GET', encodeURI(url)); + var xhr = new XMLHttpRequest(); + xhr.open('GET', encodeURI(url.toString()); xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); xhr.onload = function() { @@ -30,4 +31,4 @@ xhr.send(); })(); -endblock(); ?> \ No newline at end of file +endblock(); ?>