Skip to content

Commit 2bde191

Browse files
authored
👌 IMPROVE: Simplify normalize_uri (#98)
`html.quote` can take a string and do utf-8 encoding internally
1 parent ecb8727 commit 2bde191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

markdown_it/common/normalize_url.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def unescape_string(s: str) -> str:
5454

5555

5656
def normalize_uri(uri: str) -> str:
57-
return quote(uri.encode("utf-8"), safe=str("/@:+?=&()%#*,"))
57+
return quote(uri, safe="/@:+?=&()%#*,")
5858

5959

6060
##################

0 commit comments

Comments
 (0)