mirror of
https://github.com/iptv-org/iptv.git
synced 2026-11-24 01:01:01 +02:00
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:
+1
-1
@@ -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, '+')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user