mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Fix magnet query parsing for values containing '='
This commit is contained in:
1 parent
b2d1cd1383
commit
d10d65634d
2 files changed
+50
-1
No files matched your search
+3
-1
@@ -223,7 +223,9 @@ export function normalizeMagnetInput(rawValue) {
|
||||
|
||||
const params = [];
|
||||
for (const rawParam of rawParams) {
|
||||
const [rawKey, rawVal = ""] = rawParam.split("=", 2);
|
||||
const separatorIndex = rawParam.indexOf("=");
|
||||
const rawKey = separatorIndex === -1 ? rawParam : rawParam.slice(0, separatorIndex);
|
||||
const rawVal = separatorIndex === -1 ? "" : rawParam.slice(separatorIndex + 1);
|
||||
const key = rawKey.trim();
|
||||
if (!key) {
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user