Why does Internet explorer encode link urls on the fly, and how to stop that behavior?
I have a really annoying problem with IE (all versions from what I can tell). Every link produced from the server side (may it be a string with an a-tag, hyperlink etc.) gets encoded on IE. Eg. http://www.some-domain.com/my document.pdf gets a correct encoding to: http://www.some-domain.com/my%20document.pdf However if I decide to do 开发者_如何学Gothat encoding myself on the server side we get: http://www.some-domain.com/my%20document.pdf and IE encodes this (and that is the problem) and we get: http://www.some-domain.com/my%2520document.pdf and the result is a link that is not correct.
%25 = % => %2520 = %20
How can I stop this behaviour in IE? Every other browser i've tried does not do this.
You could try replacing the space with a +
- browsers treat this as a space and it shouldn't need encoding.
http://www.example.com/my+document.pdf
精彩评论