When going to https://stackoverflow.com/questions/tagged/c%23 and then logging in, Stack Overflow redirects me to the unencoded https://stackoverflow.com/questions/tagged/c#, which effectively is the same as redirecting me to https://stackoverflow.com/questions/tagged/c apparently, which is not what I want, since I don't know C :-)

Should this happen? Is there a way around this? (I'm currently in Google Chrome, but I don't think it would matter.)

  • Hmm, this seems to be a regression – Tim Stone Oct 26 '13 at 16:47
  • It's not an Chrome issue (as expected). Verified in IE10 and FF 24.0 on Win7 – rene Oct 26 '13 at 17:11
  • 1
    verified using chrome and google; will investigate (not least: that will bug me too, since my landing page includes c%23) – Marc Gravell Oct 26 '13 at 18:23

Well, that's kinda fun; looks like HttpUtility.UrlPathEncode broke... I suspect in .NET 4.5.1 at some point (not sure when, where, how or why); it used to be that we could pass it a+b#c and get back a%2bb%23c - but now in returns ... a+b#c.

The code we have there was actually over-complicated to work around some existing ... "peculiarities" in some of the encoding / url APIs, but it looks like the cheese has been moved - I've compensated accordingly (it is now much simpler). I wonder what corner cases are lurking now...

Fixed after next deploy (so something strictly later than "2013.10.25.1554")

  • Don't you a Microsoft platinum support at your service for such cases of bugs in their framework? :) – Shadow The Dragon Wizard Oct 26 '13 at 19:09
  • 1
    @ShaWizDowArd (chuckles quietly in a corner) – Marc Gravell Oct 26 '13 at 20:28
  • Wait... so your previous bug fix caused a new bug when the original bug in the framework was fixed?? – Shadow The Dragon Wizard Oct 26 '13 at 20:59
  • @ShaWizDowArd I would be reluctant to say that the original bug was fixed; more like it just changed a bit more. I can still reproduce craziness. – Marc Gravell Oct 26 '13 at 21:02
  • 3
    I see. Can't you just write your own custom made HttpUtility.UrlPathEncode and be done with it once and for all? And if it works well, offer the code to Microsoft! ;) – Shadow The Dragon Wizard Oct 26 '13 at 21:05

You must log in to answer this question.

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