fix: keep %25 escapes when playlist:format normalizes links

decodeURI decodes %25, so normalizeURL turned an encoded percent sign into a bare "%": in the path (normalize-url runs decodeURI on the pathname) a%2520b became a%20b, a different file, and in the query token=50%25off became token=50%off, a malformed escape. %25 is now swapped for a placeholder before normalize-url and put back after decoding.
This commit is contained in:
Leo Camus
2026-11-24 15:05:13 +00:00
parent da2e6062bb
commit 24c9300655
3 changed files with 13 additions and 1 deletions
@@ -7,3 +7,9 @@ http://example.com/a%2Fb/index.m3u8
http://example.com/index.m3u8?id=1%232
#EXTINF:-1 tvg-id="",Example Query Nested URL (720p)
http://example.com/index.m3u8?name=TV%2B&url=http%3A%2F%2Fexample.org%2Fa.m3u8%3Fk%3D1%26exp%3D2
#EXTINF:-1 tvg-id="",Example Path Percent (720p)
http://example.com/a%2520b/index.m3u8
#EXTINF:-1 tvg-id="",Example Query Percent (720p)
http://example.com/index.m3u8?token=50%25off
#EXTINF:-1 tvg-id="",Example Malformed Percent (720p)
http://example.com/a%ZZ/index.m3u8?token=50%25off