From 77f4fd744783bc5d58bb9eb4dc32bd9b7cd2adc7 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Fri, 8 Nov 2024 14:58:28 +0000 Subject: [PATCH] Fixed #1157: magnetLink queryString to start with ? and not ?& --- static/skin/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)