url_to_bytestring should be iri_to_uri
Bug #528779 reported by
Max Rabkin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ibid |
Fix Committed
|
Low
|
Stefano Rivera |
Bug Description
URLs *are* byte strings (or at least, they're ASCII strings). The function really converts IRIs to URIs.
Moreover, it does so incorrectly, as it always IDNA-encodes the first component of the "host". It should only do so on URI schemes where we know that part is a domain name, and if it fails we should simply %-encode it. [RFC 3987, pp 10-11].
Related branches
lp:~stefanor/ibid/url-terminology-528779
- Michael Gorven: Approve
- Jonathan Hitchcock: Approve
- Max Rabkin: Approve
-
Diff: 157 lines (+30/-17)6 files modifieddocs/api/ibid.utils.rst (+3/-3)
ibid/plugins/ascii.py (+2/-2)
ibid/plugins/languages.py (+2/-2)
ibid/plugins/network.py (+2/-2)
ibid/utils/__init__.py (+19/-6)
ibid/utils/html.py (+2/-2)
Changed in ibid: | |
importance: | Undecided → Low |
milestone: | none → 0.2 |
status: | New → Triaged |
Changed in ibid: | |
assignee: | nobody → Stefano Rivera (stefanor) |
status: | Triaged → In Progress |
Changed in ibid: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.