On one's own User Page (tested on StackOverflow site), on favorites tab: https://stackoverflow.com/users/46058?tab=favorites, the links which should select sort order, i.e. "added", "recent", "views", "newest", "votes" links are double HTML encoded, containing & in place of & (or even better ;).

For example link is:

  • https://stackoverflow.com/api/userfavorites.html?page=1&pagesize=15&userid=46058&sort=recent

and should be

  • https://stackoverflow.com/api/userfavorites.html?page=1&pagesize=15&userid=46058&sort=recent

This does not matter if you just click on link, as SO would then use Ajax to update page, landing on

  • https://stackoverflow.com/users/46058?tab=favorites#fpage_1-fsort_recent

But it does matter when I use 'Ctrl-Click' or 'Open in new tab' to open in new tab (landing on "Page Not Found"). You can also see this incorrect URL on mouseover (on hover) in the status bar area.

When I edit link to the second version it works correctly.

The stats tab doesn't have this bug.


1 Answer 1


HTML 4.01 strict requires ampersand to be encoded.


Because the ampersand character (&) is reserved for marking character entities, authors should never use raw ampersands in their HTML source-- and that includes ampersands inside URLs! Thus, any URL that needs an ampersand should be written like this:


  • 1
    But they're double encoded as & on that page, which is the issue.
    – Tim Stone
    Nov 18, 2010 at 7:01
  • @tim ah, that would be bad then. Sorry, I wasn't getting that part.. Nov 18, 2010 at 7:24

You must log in to answer this question.

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