Smileyt / python-markdown2

Automatically exported from code.google.com/p/python-markdown2
Other
0 stars 0 forks source link

Escape non-ascii chars in urls #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. import markdown2
2. markdown2.markdown(u'[link](http://example.com/тест)')

What is the expected output? What do you see instead?
now this produces following output: 
>>> u'<p><a 
href="http://example.com/\xd1\x82\xd0\xb5\xd1\x81\xd1\x82">link</a></p>\n'
it would be nice to see more standards compliant
>>> u'<p><a href="http://example.com/%D1%82%D0%B5%D1%81%D1%82">link</a></p>\n'

What version of the product are you using? On what operating system?
1.0.1.15 on ubuntu

Please provide any additional information below.
this can be done quite easily with urllib2.quote 

Original issue reported on code.google.com by atregoub...@gmail.com on 8 Oct 2009 at 9:52

GoogleCodeExporter commented 8 years ago

Original comment by tre...@gmail.com on 27 May 2010 at 3:09