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 am trying to post this link

http://en.wikipedia.org/wiki/Tarjan's_off-line_least_common_ancestors_algorithm

on StackOverflow, and it doesn't get linked because of the '.

How can I convert it into a postable link (w/o using any URL shortners, of course)?

I remember ( can be replaced by a %028. What is the similar conversion for a '?


Okay, I realized after posting that it was not getting linked in the JavaScript preview, but it gets linked when it is posted. Still, how can I convert the links to JavaScript preview safe links as mentioned above?

share|improve this question
3  
    
Thanks Ladybug, I think I would have accepted it as the answer, if it were an answer. –  Lazer Aug 23 '10 at 5:42

3 Answers 3

up vote 6 down vote accepted
  1. Use Firefox. It'll automatically encode that pesky apostrophe when you copy the URL out of the address bar: http://en.wikipedia.org/wiki/Tarjan%27s_off-line_least_common_ancestors_algorithm

  2. Replace the apostrophe with a HTML entity:
    http://en.wikipedia.org/wiki/Tarjan's_off-line_least_common_ancestors_algorithm
    http://en.wikipedia.org/wiki/Tarjan's_off-line_least_common_ancestors_algorithm

  3. Don't worry about it. As you note, it works once you've posted it.

share|improve this answer

This is a bug. ' is valid in the path portion of the URL (and so are ( and )).

See RFC 3986:

URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
hier-part     = "//" authority path-abempty
              / path-absolute
              / path-rootless
              / path-empty
path-abempty  = *( "/" segment )
segment       = *pchar
pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
              / "*" / "+" / "," / ";" / "="
share|improve this answer
    
True, so far as it goes, but when you're dealing with systems that try to parse URLs out of markup using regular expressions that probably were never tested against anything at all unusual, it's a good deal safer to just escape punctuation. –  Shogging through the snow Aug 22 '10 at 21:16
    
@Shog What systems are you talking about? This is about stackoverflow code recognizing a valid URL. It does not recognize a valid URL, hence it's a bug. If the problem is dealing with those buggy systems, SO can just escape those characters afterwards... –  Artefacto Aug 22 '10 at 22:57
    
sure it's a bug. But not one that will be fixed. Lazer's question was, "How can I make this link work anyway?" not "Is this a bug". –  Shogging through the snow Aug 22 '10 at 23:26
    
@Shog So... this was fixed server-side, but not client-side. Brilliant. –  Artefacto Aug 22 '10 at 23:43

As of recently, the editor will do that automatically for you when entering a link via the button (or Ctrl-L).

share|improve this answer

You must log in to answer this question.

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