What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

I was trying to follow the link to GitHub in this question:

What are some interesting features of the EveryBlock.com source code?

but it contained a percent-escaped underscore, though the source didn't. Escaping the link broke it (which may be GitHub's fault, but nevertheless...).

Specifically, the link should have been (and was written in the source as):

http://github.com/brosner/everyblock_code/tree/master

but was rendered as:

http://github.com/brosner/everyblock%5Fcode/tree/master

I couldn't figure out any way to fix the link so it worked (aside from sending it through a URL shortening service or similar). There's no need to escape _ in URLs; perhaps it could just be passed through. Or is there some way to do this?

share|improve this question
    
I am interested in the ways how this bug can be solved. --- It seems that the problem is in the current browsers. Is there any solution to the problem? –  Masi Jul 26 '09 at 19:51
    
It looks fine to me. –  mmyers Aug 5 '09 at 21:06
2  
the link seems to work now (and webservers that don't unescape are configured incorrectly) but see dlamblin's answer for alt forms –  Jeff Atwood Aug 13 '09 at 4:26
    
It doesn't work for me on the original question, nor in dlamblin's comment below. –  Nicholas Riley Aug 30 '09 at 1:59
    
Sorry Nicholas is right, It only appears to work in the preview but not when posting. I'll try it out in this comment: code.google.com/apis/ajax/playground/… –  dlamblin Nov 12 '09 at 18:53
    
As you can see, the link's _ is not changed to %5F in a comment, and therefore works. All the other underscore in URL threads have been (sadly) closed as by-design or declined. Personally I think it's annoying to expect the rest of the world to come around to decoding URLs instead of just letting the _ be. –  dlamblin Nov 12 '09 at 18:56

4 Answers 4

Using the original markdown.pl implementation:

echo "[a](http://example.com/test_ing)" | markdown.pl

..returns..

<p><a href="http://example.com/test_ing">a</a></p>

..as one would expect.

The showdown.js preview in the editor also does not escape the underscore, so the preview is different from the final result..

Thus I'm fairly sure it's correct to blame this on a bug in the SO markdown renderer..

share|improve this answer
    
Now if only I can convince TPTB of that... –  Nicholas Riley Oct 24 '09 at 16:12
    
@Nicholas Riley: Who/what do you mean by "TPTB"? –  dbr Oct 24 '09 at 17:41

If you used the ctrl+L part of the provided editor it would work.*

It would end up looking like this:

If you used the ctrl+L part of the provided editor it would [work][1].


  [1]: http://github.com/brosner/everyblock_code/tree/master

*Update This is once again a difference between previewing and posting. It does not work, but appears to in the preview.

For a different example of a URL that does not decode %5F into _ and therefore breaks look at: http://code.google.com/apis/ajax/playground/?type=visualization#column%5Fchart

share|improve this answer
    
For comparison, the google code example link should have been: code.google.com/apis/ajax/playground/… –  dlamblin Nov 12 '09 at 19:00

I ran into the same issue with a link with underscores.

Now this is weird. I'm trying to replicate the issue here (using the link button or ctrl + L) and am not able to. Is meta running a different version of the editor than SO?

Anyway, I worked around it by using a href.

share|improve this answer

I believe it invalidates the markup if there is an underscore. Same with an ampersand.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .