]> jfr.im git - yt-dlp.git/commit
[utils] Escape URLs in `sanitized_Request`, not `sanitize_url`
authorpukkandan <redacted>
Tue, 1 Jun 2021 12:35:41 +0000 (18:05 +0530)
committerpukkandan <redacted>
Tue, 1 Jun 2021 14:59:02 +0000 (20:29 +0530)
commitbc6b9bcd6554c10aa321cbfe151272e0df1a869b
treea41c075eb2f54f48087c201cd3ae5857b60a52ba
parent6e6390321c3937e26c3f51ee1840d9e97764371f
[utils] Escape URLs in `sanitized_Request`, not `sanitize_url`
d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a added escaping of URLs while sanitizing. However, `sanitize_url` may not always receive an actual URL.
Eg: When using `yt-dlp "search query" --default-search ytsearch`, `search query` gets escaped to `search%20query` before being prefixed with `ytsearch:` which is not the intended behavior. So the escaping is moved to `sanitized_Request` instead.
test/test_utils.py
yt_dlp/utils.py