File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,3 +85,9 @@ def test_github_issue_30():
8585 result = textile .textile (text )
8686 expect = '\t <p><a href="http://lala.com" title="Tëxtíle">Tëxtíle</a></p>'
8787 assert result == expect
88+
89+ def test_github_issue_36 ():
90+ text = '"Chögyam Trungpa":https://www.google.com/search?q=Chögyam+Trungpa'
91+ result = textile .textile (text )
92+ expect = '\t <p><a href="https://www.google.com/search?q=Ch%C3%B6gyam%2BTrungpa">Chögyam Trungpa</a></p>'
93+ assert result == expect
Original file line number Diff line number Diff line change @@ -938,7 +938,10 @@ def encode_url(self, url):
938938 quote (unquote (pce ).encode ('utf8' ), b'' )
939939 for pce in parsed .path .split ('/' )
940940 )
941- query = quote (unquote (parsed .query ), b'=&?/' )
941+ query_text = parsed .query
942+ if isinstance (query_text , six .text_type ):
943+ query_text = query_text .encode ('utf-8' )
944+ query = quote (unquote (query_text ), b'=&?/' )
942945 fragment = quote (unquote (parsed .fragment ))
943946
944947 # put it back together
You can’t perform that action at this time.
0 commit comments