From 116dd8bc53fc683f84dfdc6d5f4fbb9d8aa3f794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Mon, 18 Nov 2024 20:15:24 +0100 Subject: [PATCH 1/3] fix: escaped table name passed to the API --- views/get.ejs | 6 +++--- views/item.ejs | 2 +- views/meta.ejs | 7 ++++--- views/partials/error-container.ejs | 5 +++++ views/scan.ejs | 12 ++++++------ views/tables.ejs | 2 +- 6 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 views/partials/error-container.ejs diff --git a/views/get.ejs b/views/get.ejs index 0284361..814bd4a 100644 --- a/views/get.ejs +++ b/views/get.ejs @@ -24,17 +24,17 @@ diff --git a/views/item.ejs b/views/item.ejs index 01ba2c5..f17faf2 100644 --- a/views/item.ejs +++ b/views/item.ejs @@ -92,7 +92,7 @@ method: 'delete' }).then((response) => { if (response.ok) { - window.location = `/tables/<%= TableName %>` + window.location = `/tables/<%= encodeURIComponent(TableName) %>` } }).catch((error) => { console.error(error) diff --git a/views/meta.ejs b/views/meta.ejs index 88257af..31c65d1 100644 --- a/views/meta.ejs +++ b/views/meta.ejs @@ -25,17 +25,17 @@ @@ -54,6 +54,7 @@