You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Data URI fragments are decoded as payload, appending text or corrupting bytes #2690
Reproduced on main 4cc9fa17653d695d64fb9eee5b33d4de55ff84e8, macOS, Python 3.12.15. It also occurs on #2682, which fixes a different decoding problem.
parse_data_uri decodes everything after the comma, including the fragment. Strip the raw fragment before percent-decoding: %23 must still produce a literal #, and ? must remain in the payload. The WHATWG Fetch data URL processor excludes fragments; Node's fetch returns the expected text for both examples.
Parser and public API regression tests reproduced both failures. Escaped-hash and query controls passed. I searched existing issues and PRs and didn't find this failure covered.
Activity