locopablo / markdownsharp

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

URL encoding #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a hyperlink to 
'http://docs.jquery.com/Tutorials:Introducing_$(document).ready()'

What is the expected output? What do you see instead?
A link to be produced, but it's not parsed.

The link isn't URL encoded which is the issue.

Original issue reported on code.google.com by mrshrink...@gmail.com on 17 Jan 2010 at 9:33

GoogleCodeExporter commented 9 years ago
When you say add link can you clarify what you mean in markup? There are about 5
different ways.. 

here's one example:

----------------------------------------------------
Here's a [link to JQuery docs][1].

[1]: http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
----------------------------------------------------

resulting markup seems OK to me--

http://is.gd/6uc9G

Original comment by wump...@gmail.com on 18 Jan 2010 at 3:37

GoogleCodeExporter commented 9 years ago
Here's the original markdown I was using stackoverflow.com:
<pre>

    $(function(){

    }); 

is [jQuery][1] (a Javascript library) shorthand for:

    $(document).ready(function(){

    });

It is what you use to do with `<body onload="xxx">` but more sophisticated. You 
can 
get a fuller explanation [here][2].

  [1]: http://www.jquery.com
  [2]: http://docs.jquery.com/Tutorials:Introducing_$(document).ready()

</pre>

Original comment by mrshrink...@gmail.com on 18 Jan 2010 at 10:17

GoogleCodeExporter commented 9 years ago
(Not including the pre tags)

Original comment by mrshrink...@gmail.com on 18 Jan 2010 at 10:18

GoogleCodeExporter commented 9 years ago
Sorry - I should've tested this with the solution not just on 
stackoverflow.com. It 
links correctly with the latest release so it's an SO related issue. Another 
one to 
close

Original comment by mrshrink...@gmail.com on 18 Jan 2010 at 10:38

GoogleCodeExporter commented 9 years ago
I don't think the URL sanitizer allows $ in the URLs, and will strip them out.

But yes it would be helpful if you TESTED the bug reports before making them.

Original comment by wump...@gmail.com on 18 Jan 2010 at 3:45

GoogleCodeExporter commented 9 years ago
Note that I did modify the list of encoded characters if 
EncodeProblemUrlCharacters
(optional) is set -- I added $ and "

This is set on SO..

Original comment by wump...@gmail.com on 19 Jan 2010 at 2:24