Form string data url encoded by some browsers .net
i came accross with a peculiar issue开发者_Go百科 on my mobile site. some phones/gateways sends form post data as url encoded and a text such as
"hey how are you?"
in a form with method post
stored in the db as
"hey+how+are+you%3f"
This is not the issue with many browsers but one single network from USA called Metro. I notice different phone models acting same way so i assue this is an issue with proxy/gateway.
would simply putting
_msg = HttpUtility.UrlDecode(_msg);
solve my problem? any other suggestions?
Thanks
You wouldn't want to UrlDecode every message. It would, for example, break many URLs people might be posting.
It might be worth adding as a workaround if you can detect that one gateway at request time. But if the error you claim is really happening, I would have thought it would have broken many more websites than just yours; presumably all parameters are affected, and things like IDs that are more brittle than textual messages will just stop working if incorrectly escaped. Ultimately, the only fix would be at "Metro"'s end; have you tried talking to them?
精彩评论