1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

chore(deps): a list's search is kept in sessionStorage, without js-cookie

js-cookie served only table_filter.js, which kept a list's search in a
cookie for a day; the cookie went to the server with every request.
The search is now kept in the tab's sessionStorage: it stays across
reloads and pages in that tab, a new tab starts empty, and the server
never sees it. The library goes.
This commit is contained in:
catborise 2026-11-05 12:12:21 +03:00
parent a81eb79e51
commit 3baa93048b
4 changed files with 22 additions and 9 deletions

View file

@ -134,7 +134,7 @@ class TemplateHtmlConcatenationTestCase(TestCase):
# has to be reviewed (use .text() / .val() / DOM APIs for server data instead).
HTML_SINK = re.compile(r"""\.html\(|innerHTML\s*=|append\(\s*['"]<""")
# the libraries kept as published, not the app's scripts
VENDORED_SCRIPTS = {"jquery.js", "js.cookie.js", "socket.io.js"}
VENDORED_SCRIPTS = {"jquery.js", "socket.io.js"}
ALLOWED_HTML_SINKS = {
("static/js/instance_page.js", "hostDevices.innerHTML = html;"): "the panel's own fragment, host_devices_form.html, escaped by Django",
("static/js/instance_page.js", "migratePlan.innerHTML = html;"): "the panel's own fragment, migrate_plan.html, escaped by Django",