Stephen J. Turnbull a écrit : > What really saves the day here is not that "common encodings just > don't do that". It's that even in the case where only syntactically > significant bytes in the representation are URL-encoded, they *are* > URL-encoded. As long as the parsing library restricts itself to > treating only wire-format input, you're OK.[1] But once you start > doing things that involve decoding URL-encoding, you can run into > trouble. > If I understand you well, any processing of unquoted bytes is dangerous per se. If this is true, then perhaps 'unquote' doesn't disserve the criticism it received in this thread for always returning str. This would be in fact quite fortunate, as it forces url processing to either happen on quoted bytes (before calling 'unqote'), or on unquoted str (on the result of 'unquote'), both of which are safe.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4