Skip to content

Commit

Permalink
Merge pull request #375 from prousso/chore/add-symbols-pictographs-su…
Browse files Browse the repository at this point in the history
…pport

chore(url): allow symbols and pictographs in url
  • Loading branch information
yozachar authored May 20, 2024
2 parents bcb1342 + d711ee7 commit 88d4e89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/validators/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def _path_regex():
return re.compile(
# allowed symbols
r"^[\/a-z0-9\-\.\_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\%"
# symbols / pictographs
+ r"\U0001F300-\U0001F5FF"
# emoticons / emoji
+ r"\U0001F600-\U0001F64F"
# multilingual unicode ranges
Expand Down
1 change: 1 addition & 0 deletions tests/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"http://[::FFFF:129.144.52.38]:80/index.html",
"http://[2010:836B:4179::836B:4179]",
"http://foo.bar",
"http://foo.bar/📍",
"http://google.com:9/test",
"http://5.196.190.0/",
"http://username:password@example.com:4010/",
Expand Down

0 comments on commit 88d4e89

Please sign in to comment.