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

According to this answer:

We now encode any colons at position 7 or greater, which are not followed by 2 or more numbers.

Unfortunately this breaks links to URLs such as this one: http://www.wowhead.com/zones=8#show:alliance:flightmaster

The link is rendered with the colons encoded and the result is: http://www.wowhead.com/zones=8#show%3aalliance%3aflightmaster

According to this answer, colons are valid characters in hashtags and don't need to be encoded.

Observed in the wild here.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

According to this answer, colons are valid characters in hashtags and don't need to be encoded. (In fact, % is not a valid character in a hashtag.)

I'm not sure we're looking at the same answer here – because what I'm seeing is that percent-encoding is just fine in the fragment.

This is a valid link to the answer:

http://stackoverflow.com/questions/2849756#%32%38%34%39%38%30%30

– granted, IE8 doesn't handle it (I didn't try IE9), but Firefox, Chrome, Safari, and Opera all do the right thing.

Point being: Whether it's necessary or not, it's not illegal. A colon and %3a are semantically identical in URLs per the RFC.

It may be worth thinking about it, since some clients (including, I would assume, many hashbang-like JavaScript handlers) fail to handle it correctly, but your claim that we break the link is wrong.

share|improve this answer
    
Indeed, like your last paragraph kind of states, it's not only about the browser being able to scroll, but about JavaScript using the fragment for further processing. After clicking your encoded example, a simple javascript:alert(document.location.hash); shows the fragment will need some further processing then. But things like meta.stackoverflow.com/users/115866/… (using %2d rather than the dashes) work fine here on SE. ;-) –  Arjan Apr 24 '11 at 9:32
    
You're right, I misread the answer and % is valid (it's an unencoded % that's invalid). If I'm interpreting the rest correctly however, aren't unencoded colons allowed? –  Brant Apr 24 '11 at 14:58

You must log in to answer this question.

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