File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,3 +130,10 @@ def test_github_issue_43():
130130 result = textile .textile (text )
131131 expect = '<pre>smart ‘quotes’ are not smart!</pre>'
132132 assert result == expect
133+
134+ def test_github_issue_45 ():
135+ """Incorrect transform unicode url"""
136+ text = '"test":https://myabstractwiki.ru/index.php/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0'
137+ result = textile .textile (text )
138+ expect = '\t <p><a href="https://myabstractwiki.ru/index.php/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0">test</a></p>'
139+ assert result == expect
Original file line number Diff line number Diff line change @@ -943,7 +943,7 @@ def encode_url(self, url):
943943 host = netloc_parsed ['host' ]
944944 port = netloc_parsed ['port' ] and netloc_parsed ['port' ]
945945 path = '/' .join ( # could be encoded slashes!
946- quote (unquote (pce ) .encode ('utf8' ), b'' )
946+ quote (unquote (pce .encode ('utf8' ) ), b'' )
947947 for pce in parsed .path .split ('/' )
948948 )
949949 fragment = quote (unquote (parsed .fragment ))
You can’t perform that action at this time.
0 commit comments