« get me outta code hell

never encode slashes in URLs - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-07-14 12:37:17 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-07-14 12:37:17 -0300
commitd3315efaf0cfb481fa32a8ea1739431f32aa1a98 (patch)
treee34edf7ed9be58ec0085f64b70a15375101f11c4
parent4516c98c09ff775892707c3f2b61c857dd82707d (diff)
never encode slashes in URLs
-rw-r--r--src/util/urls.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/urls.js b/src/util/urls.js
index ad912908..4d099acd 100644
--- a/src/util/urls.js
+++ b/src/util/urls.js
@@ -94,7 +94,9 @@ export function generateURLs(urlSpec) {
             if (device) {
               return value;
             } else {
-              return encodeURIComponent(value);
+              let encoded = encodeURIComponent(value);
+              encoded = encoded.replaceAll('%2F', '/');
+              return encoded;
             }
           } else {
             missing++;