Skip to content

Commit

Permalink
Merge pull request #74 from valiant1x/master
Browse files Browse the repository at this point in the history
Include `~` as unreserved character
  • Loading branch information
sigmavirus24 committed Nov 30, 2020
2 parents 0baac58 + fd01b27 commit dba3ada
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rfc3986/abnf_regexp.py
Expand Up @@ -27,7 +27,7 @@
ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
DIGIT = "0123456789"
# https://tools.ietf.org/html/rfc3986#section-2.3
UNRESERVED = UNRESERVED_CHARS = ALPHA + DIGIT + r"._!-"
UNRESERVED = UNRESERVED_CHARS = ALPHA + DIGIT + r'._!-~'
UNRESERVED_CHARS_SET = set(UNRESERVED_CHARS)
NON_PCT_ENCODED_SET = RESERVED_CHARS_SET.union(UNRESERVED_CHARS_SET)
# We need to escape the '-' in this case:
Expand Down
1 change: 1 addition & 0 deletions tests/test_normalizers.py
Expand Up @@ -97,6 +97,7 @@ def test_fragment_normalization():
["component", "encoded_component"],
[
("/%", "/%25"),
("/~", "/~"),
("/%a", "/%25a"),
("/%ag", "/%25ag"),
("/%af", "/%af"),
Expand Down

0 comments on commit dba3ada

Please sign in to comment.