one of the weirdest cases I encountered is that, unless you turn the behavior off, POST variables get sanitized automatically in ASP.NET; at one place I worked we found that users sometimes couldn't log in because ASP.NET didn't like the passwords they were using and chose to mangle them
(the justification for the strange behavior was that it is really difficult to sanitize text that might be HTML rendered because of the all the weird ways you can run JS)