Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

When somebody posts a URL in the comments, it is automatically cleaned up and turned into a link. This is an excellent feature, but the system does not allow some symbols in URLs. For example, I've added a comment to this question consisting entirely of the text's_Law

but when you try to click on the link, you get taken to the page, which is the wrong page.

Is there some reason ' is assumed not to be in URLs? Can we change the comment link algorithm to allow 's?

share|improve this question
If I've understood random's comment to Jeff's answer correctly, this behavior is completely standard. Is it possible to tell my browser to automatically encode the URL in my URL bar so that I can just copy and paste? – Anton Geraschenko Oct 8 '09 at 20:24
What about http://☃.net and www.☃.net ;-) – Arjan Mar 1 '10 at 7:49
up vote 3 down vote accepted

So encode the ' then

share|improve this answer
That's a fine workaround, but it would be really nice if I could just paste the URL in as it appears at the top of my browser. Is there some reason not to allow that? – Anton Geraschenko Oct 7 '09 at 22:45
Actually, I'm being a bit dodgy. The reason I want this feature-request implemented is because I have an SE site and I don't want my users to have to know how to encode 's. But Michael Pryor has said that if a feature-request pertains to the S[OFU] sites as well as SE sites, he'd rather wait for you to implement it. – Anton Geraschenko Oct 7 '09 at 22:48
Quotes are reserved characters: – random Oct 8 '09 at 0:58

Looks like its related to WMD, so, I just tried to reverse-engineer some of its js.

basically, adding ' to this line

var E=/^(<a\shref="(\#\d+|(https?|ftp):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)']+)"(\stitle="[^"<>]+")?\s?>|<\/a>)$/i;

and this line


and removing ' from [^'">\s] from this line

G=G.replace(/<((https?|ftp):[^">\s]+)>/gi,'<a href="$1">$1</a>');

works here for's_Law

But, better replace ' to %27 in background, because its smells like SQLi :D

PS: There is accepted answer already, but Jeff just bumped it, so looks like he might considering this again.

share|improve this answer
Great, please add ☃ as well ;-) – Arjan Mar 1 '10 at 8:22
Heh, thats need to judge by Jeff :D – YOU Mar 1 '10 at 8:24
this has nothing to do with WMD, it is related to URLs in comments per the title.. I retagged it to help. – Jeff Atwood Mar 1 '10 at 8:24
Jeff, how about in normal question and answer?, now, url with ' does not work too. – YOU Mar 1 '10 at 8:26

You must log in to answer this question.

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