From 8612370312f20ffdc3802488e7d3fe7c591873e4 Mon Sep 17 00:00:00 2001 From: audibleptr <129372343+audibleptr@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:18:08 +0300 Subject: [PATCH] Change `unescape` to `decodeURI` --- src/pytest_html/scripts/storage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pytest_html/scripts/storage.js b/src/pytest_html/scripts/storage.js index ac39c12b..ffef14e8 100644 --- a/src/pytest_html/scripts/storage.js +++ b/src/pytest_html/scripts/storage.js @@ -30,7 +30,7 @@ const hideCategory = (categoryToHide) => { const settings = [...new Set(currentVisible)].filter((f) => f !== categoryToHide).join(',') url.searchParams.set('visible', settings) - window.history.pushState({}, null, unescape(url.href)) + window.history.pushState({}, null, decodeURI(url.href)) } const showCategory = (categoryToShow) => { @@ -44,7 +44,7 @@ const showCategory = (categoryToShow) => { const noFilter = possibleFilters.length === settings.length || !settings.length noFilter ? url.searchParams.delete('visible') : url.searchParams.set('visible', settings.join(',')) - window.history.pushState({}, null, unescape(url.href)) + window.history.pushState({}, null, decodeURI(url.href)) } const getSort = (initialSort) => { @@ -59,7 +59,7 @@ const getSort = (initialSort) => { const setSort = (type) => { const url = new URL(window.location.href) url.searchParams.set('sort', type) - window.history.pushState({}, null, unescape(url.href)) + window.history.pushState({}, null, decodeURI(url.href)) } const getCollapsedCategory = (renderCollapsed) => {