Open aagd opened 10 years ago
Not urlencoding ~
sounds easy enough. I'm not sure I understand the edit you just did with the workaround, but I'll see if I can simply not strip the ~
.
the workaround should just show that by using html syntax i can get around the ~
url encoding problem. sure it would be ideal if this could be fixed in the source.
After trying for an hour to reproduce your problem, I think there might be some confusion.
I don't see anywhere in the markdown reference that bare urls such as http://www.google.com/
are supposed to be converted into links. The GitHub markdown does automatically convert bare urls to links, but the discount module that QLMarkdown is using doesn't support it.
If you want to use a link, you have to write [Link text](http://www.google.com/)
and it will show up like this: Link text.
Please let me know how you want to proceed with this. If you want the bare addresses converted, we should probably put it in the issues for the Discount module we're using.
I've just been hit by this (umm... in GitHub generally, so perhaps not this project at all! But anyway, for reference:) Our markdown contains ~, the HTML renders the HREF as %7E. Of three browsers tested, two send the %7E to the server and the other url-decodes to ~ before sending. This obscured what was going on. The server then failed to url-decode the %7e. Arguably the server is wrong. But even so, according to the latest applicable RFC, tilde is unreserved, and "Unreserved characters can be escaped without changing the semantics of the URI, but this should not be done unless the URI is being used in a context that does not allow the unescaped character to appear." (http://www.rfc-editor.org/rfc/rfc2396.txt) The link in question was IBM 5110 Emulator which for me works with Chrome, not with Firefox and not with Safari.
There are many arguments why "tilde" ~ character should be encoded. On the other hand more recent RFC 3986 lists ~ as character that is not escaped by default (see Python's urllib change).
This is not the usual markdown behaviour and breaks links like
http://localhost/~xyz/
as they are converted tohttp://localhost/%7Exyz/
.workaround: using html. instead of:
<http://localhost/~xyz/>
this will work:<a href="http://localhost/~xyz/">http://localhost/~xyz/</a>