For example:
>>> u = URL('http://bob:%40malware.com%2F@example.org/path')
>>> str(u)
'http://bob:%40malware.com%2F@example.org/path'
>>> u.host
'example.org'
>>> u.human_repr()
'http://bob:@malware.com/@example.org/path'
>>> URL(u.human_repr()).host
'malware.com'
There are similar problems with user, path and query.
I think that human_repr() should produce a string which will produce the equivalent URL when passed to the URL constructor. It means that all corresponding delimiters and % should be %-encoded. It is worth to encode also non-printable characters.
For example:
There are similar problems with user, path and query.
I think that
human_repr()should produce a string which will produce the equivalent URL when passed to the URL constructor. It means that all corresponding delimiters and%should be %-encoded. It is worth to encode also non-printable characters.