From 5bf226860a4bc973fe82c766c3486e665357bc74 Mon Sep 17 00:00:00 2001 From: Conrad Sollitt Date: Mon, 9 Sep 2024 22:20:35 -0700 Subject: [PATCH 01/13] =?UTF-8?q?=F0=9F=94=92=20Security=20Update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app.js b/server/app.js index ac10bd1..95ea871 100644 --- a/server/app.js +++ b/server/app.js @@ -90,7 +90,7 @@ const app = { for (let n = 0, m = pathParts.length; n < m; n++) { if (patternParts[n] !== pathParts[n]) { if (patternParts[n].length > 0 && patternParts[n].indexOf(':') === 0) { - args.push(decodeURIComponent(pathParts[n])); + args.push(pathParts[n]); } else { return [ false, [] ]; } @@ -123,7 +123,7 @@ const app = { // Match the requested path to a defined route const reqMethod = req.method; - const reqPath = new URL(req.url, `http://${req.headers.host}`).pathname; + const reqPath = decodeURIComponent(new URL(req.url, `http://${req.headers.host}`).pathname); for (let n = 0, m = this.routes.length; n < m; n++) { // First check method [GET|POST|HEAD] const method = this.routes[n].method; From 9a75da55248fc92717fe5e8401654de76d84c2e1 Mon Sep 17 00:00:00 2001 From: Conrad Sollitt Date: Mon, 9 Sep 2024 22:23:36 -0700 Subject: [PATCH 02/13] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Update=20for=20Edge/?= =?UTF-8?q?IE=20related=20to=20CSS=20[ms-high-contrast]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/css/image-classification-ie.css | 15 +++++++++++++++ examples/css/image-classification.css | 15 --------------- examples/hello-world/hbs.htm | 6 ++++++ examples/hello-world/hello-world-ie.css | 7 +++++++ examples/hello-world/hello-world.css | 7 ------- examples/hello-world/hyperapp.htm | 6 ++++++ examples/hello-world/js.htm | 6 ++++++ examples/hello-world/preact.htm | 6 ++++++ examples/hello-world/rax.htm | 6 ++++++ examples/hello-world/react.htm | 6 ++++++ examples/hello-world/vue.htm | 6 ++++++ examples/hello-world/vue3-with-jsx.htm | 6 ++++++ examples/hello-world/web-url-router.htm | 6 ++++++ examples/hello-world/web.htm | 6 ++++++ examples/html/npm-start-page.htm | 4 +++- examples/image-classification-hbs.htm | 6 ++++++ examples/image-classification-react.htm | 6 ++++++ examples/image-classification-vue.htm | 6 ++++++ examples/image-classification-web.htm | 6 ++++++ js/plugins/imageGallery.js | 17 +++++++++++------ js/react/es6/ImageGallery.js | 16 ++++++++++------ 21 files changed, 130 insertions(+), 35 deletions(-) create mode 100644 examples/css/image-classification-ie.css create mode 100644 examples/hello-world/hello-world-ie.css diff --git a/examples/css/image-classification-ie.css b/examples/css/image-classification-ie.css new file mode 100644 index 0000000..ba98fb6 --- /dev/null +++ b/examples/css/image-classification-ie.css @@ -0,0 +1,15 @@ +/* IE Fallback for basic layout with key elements */ +@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) { + .content, + ul.results li { + padding: 20px; + margin: 20px; + box-shadow: 0 1px 2px 1px rgba(0,0,0,0.5); + } + + ul.image-categories { width:90vh; } + body { margin:40px; } + nav, h2 { padding:20px; } + ul.info { margin-left:20px; } + input[type='text'] { margin-bottom: 20px; } +} diff --git a/examples/css/image-classification.css b/examples/css/image-classification.css index 4505299..5de7612 100644 --- a/examples/css/image-classification.css +++ b/examples/css/image-classification.css @@ -7,21 +7,6 @@ --padding: 20px; } -/* IE Fallback for basic layout with key elements */ -.content, -ul.results li { - padding: 20px; - margin: 20px; - box-shadow: 0 1px 2px 1px rgba(0,0,0,0.5); -} -@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) { - ul.image-categories { width:90vh; } - body { margin:40px; } - nav, h2 { padding:20px; } - ul.info { margin-left:20px; } - input[type='text'] { margin-bottom: 20px; } -} - /* Page Style */ body { background-color: rgba(240, 248, 255, 1); diff --git a/examples/hello-world/hbs.htm b/examples/hello-world/hbs.htm index da27cd2..9bdcedd 100644 --- a/examples/hello-world/hbs.htm +++ b/examples/hello-world/hbs.htm @@ -6,6 +6,12 @@ DataFormsJS - {{title}} +
diff --git a/examples/hello-world/hello-world-ie.css b/examples/hello-world/hello-world-ie.css new file mode 100644 index 0000000..da0df0f --- /dev/null +++ b/examples/hello-world/hello-world-ie.css @@ -0,0 +1,7 @@ +/* Adjust top/left of orbit for IE */ +@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) { + .home-page-animation .orbit { + top: calc((100% - 152px) / 1.5); + left: calc((100% - 152px) / 2); + } +} diff --git a/examples/hello-world/hello-world.css b/examples/hello-world/hello-world.css index 5213bc7..5ed6aa2 100644 --- a/examples/hello-world/hello-world.css +++ b/examples/hello-world/hello-world.css @@ -56,13 +56,6 @@ template { display:none; } width: 152px; will-change: transform; } -/* Adjust top/left of orbit for IE */ -@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) { - .home-page-animation .orbit { - top: calc((100% - 152px) / 1.5); - left: calc((100% - 152px) / 2); - } -} .home-page-animation .orbit { animation: rotate-and-spin-clockwise 6s linear infinite; diff --git a/examples/hello-world/hyperapp.htm b/examples/hello-world/hyperapp.htm index bc91c31..e92fe45 100644 --- a/examples/hello-world/hyperapp.htm +++ b/examples/hello-world/hyperapp.htm @@ -13,6 +13,12 @@ } +
diff --git a/examples/hello-world/js.htm b/examples/hello-world/js.htm index 32da017..903cbb3 100644 --- a/examples/hello-world/js.htm +++ b/examples/hello-world/js.htm @@ -6,6 +6,12 @@ DataFormsJS - {{title}} +
diff --git a/examples/hello-world/preact.htm b/examples/hello-world/preact.htm index bc2f94f..37cdf69 100644 --- a/examples/hello-world/preact.htm +++ b/examples/hello-world/preact.htm @@ -12,6 +12,12 @@ } +
diff --git a/examples/hello-world/rax.htm b/examples/hello-world/rax.htm index 386258c..d20815c 100644 --- a/examples/hello-world/rax.htm +++ b/examples/hello-world/rax.htm @@ -6,6 +6,12 @@ DataFormsJS - {{title}} +
diff --git a/examples/hello-world/react.htm b/examples/hello-world/react.htm index 2e76165..f1e8db5 100644 --- a/examples/hello-world/react.htm +++ b/examples/hello-world/react.htm @@ -6,6 +6,12 @@ DataFormsJS - {{title}} +
diff --git a/examples/hello-world/vue.htm b/examples/hello-world/vue.htm index 91fd6cf..5ad79ab 100644 --- a/examples/hello-world/vue.htm +++ b/examples/hello-world/vue.htm @@ -6,6 +6,12 @@ DataFormsJS - {{title}} +
diff --git a/examples/hello-world/vue3-with-jsx.htm b/examples/hello-world/vue3-with-jsx.htm index 026b0bf..74c615c 100644 --- a/examples/hello-world/vue3-with-jsx.htm +++ b/examples/hello-world/vue3-with-jsx.htm @@ -13,6 +13,12 @@ } +
diff --git a/examples/hello-world/web-url-router.htm b/examples/hello-world/web-url-router.htm index c322dae..1846420 100644 --- a/examples/hello-world/web-url-router.htm +++ b/examples/hello-world/web-url-router.htm @@ -6,6 +6,12 @@ DataFormsJS - {{title}} - {{webc}} +
diff --git a/examples/hello-world/web.htm b/examples/hello-world/web.htm index b0d327e..16e1247 100644 --- a/examples/hello-world/web.htm +++ b/examples/hello-world/web.htm @@ -6,6 +6,12 @@ DataFormsJS - {{title}} - {{webc}} +
diff --git a/examples/html/npm-start-page.htm b/examples/html/npm-start-page.htm index dfc3a36..61300b4 100644 --- a/examples/html/npm-start-page.htm +++ b/examples/html/npm-start-page.htm @@ -145,13 +145,15 @@ } .hljs { font-size:15px; } - /* IE Fallback */ + /* Uncomment for IE Fallback */ + /* @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) { [data-control], #view, is-loaded, .is-loaded { width:100%; } } + */ diff --git a/examples/image-classification-hbs.htm b/examples/image-classification-hbs.htm index fdca0c7..77b456d 100644 --- a/examples/image-classification-hbs.htm +++ b/examples/image-classification-hbs.htm @@ -11,6 +11,12 @@ +