forked from reddit-archive/reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some issues with unicode in URLs
First, `UrlParser.update_query` didn't like 7-bit unclean values. `unicode()` should work everywhere `str()` did. Second, the check for emedded NBSPs in `UrlParser.is_web_safe_url` could be bypassed since `b'\xa0'` couldn't automatically be promoted to unicode (thus `u'\xa0'` != b'\xa0'.) The check was fixed to handle the NBSP char in either unicode or byte strings.
- Loading branch information
1 parent
d0108cf
commit d7acfce
Showing
2 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters