fix: keep encoded query delimiters when playlist:format normalizes links

normalize-url sorts the query parameters by default and then runs decodeURIComponent on the whole query, so %26, %3D, %3F and %2B come back as &, =, ? and +. A link that passes another URL as a parameter loses part of it to the outer query, and %2B turns into a space. The order of the parameters is now left as is.
This commit is contained in:
leoca committed 2026-11-14 03:37:50 +00:00
1 parent 0f5728f287
commit d7c1a01cf6
3 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ export function isURI(string: string): boolean {
export function normalizeURL(url: string): string {
let normalized: string
try {
normalized = normalizeUrl(url, { stripWWW: false })
normalized = normalizeUrl(url, { stripWWW: false, sortQueryParameters: false })
} catch {
return url.replace(/\s/g, '+')
}