diff --git a/static/skin/index.js b/static/skin/index.js index c4e40d22..082d3428 100644 --- a/static/skin/index.js +++ b/static/skin/index.js @@ -238,7 +238,8 @@ let finalValue = (keysToURIEncode.indexOf(key) >= 0) ? encodeURIComponent(value) : value; output += `&${key}=${finalValue}`; } - return output; + // exclude first char so the first params are not prefixed with & + return output.substring(1); } /* hack for library.kiwix.org magnet links (created by MirrorBrain) diff --git a/test/server.cpp b/test/server.cpp index a0ef64e3..98483f0d 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -63,7 +63,7 @@ const ResourceCollection resources200Compressible{ { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.css" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/index.css?cacheid=ae79e41a" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.js" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/index.js?cacheid=8f4b6a1e" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/index.js?cacheid=cc456f1f" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/iso6391To3.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/iso6391To3.js?cacheid=ecde2bb3" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/isotope.pkgd.min.js" }, @@ -294,7 +294,7 @@ R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/kiwix.css?cacheid=2158fad9" - +