libor-m/pagedown

Autolink not percent-encoded

GoogleCodeExporter opened this issue · 3 comments

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

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

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

  • Changed state: Invalid
So, how about _DoAnchors? Why are all colons encoded?

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