elvisw / pagedown

Automatically exported from code.google.com/p/pagedown
Other
0 stars 0 forks source link

Autolink not percent-encoded #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found this problem below.
http://meta.stackoverflow.com/questions/187310/problem-with-in-a-link

Look at Markdown.Converter.js at line 498 (function _DoAnchors) and line 1276 
(function _DoAutoLinks). _DoAnchors percent-encode the URL with writeAnchorTag, 
while the _DoAutoLinks does not. It's a bug of autolink.

Original issue reported on code.google.com by Eonik...@gmail.com on 4 Jul 2013 at 7:26

GoogleCodeExporter commented 9 years ago
By RFC 3986 section 2.2 ( http://tools.ietf.org/html/rfc3986#section-2.2 ) not 
encoding : is a bug. "URI producing applications should percent-encode data 
octets that correspond to characters in the reserved set unless these 
characters are specifically allowed by the URI scheme to represent data in that 
component."

Original comment by ext.rmol...@gmail.com on 4 Jul 2013 at 7:29

GoogleCodeExporter commented 9 years ago
Sections 3.3ff specifically allow colons in the path component and beyond, and 
in the scheme and authority components they are obviously allowed because 
they're part of the spec.

Original comment by b...@stackoverflow.com on 4 Jul 2013 at 9:56

GoogleCodeExporter commented 9 years ago
So, how about _DoAnchors? Why are all colons encoded?

Original comment by Eonik...@gmail.com on 5 Jul 2013 at 1:52