We have some UTF-8 XML being returned by a REST handler that contains urls. These urls have an ampersand (&), which when escaped to be UTF-8 compliant, look like this:
http://domain.com?param1=a&param2=b
The problem is, when this is then cut/pasted into a browser, the result does not correctly separate based on the escaped ampersand. Below is an example:
This works:
http://api.citysourced.com/reportimage.ashx?reportid=30885&imagesize=Small
These do not:
http://api.citysourced.com/reportimage.ashx?reportid=30885&imagesize=Small
http://api.citysourced.com/reportimage.ashx?reportid=30885%26imagesize=Small
Is there an issue with my IIS configuration (IIS 6)? The handler above is a standard generic handler written in C# .NET 4.0.
I’ve looked at the other articles here, and none of them have the right answer.
Thanks.
There’s nothing wrong with your IIS configuration. XML has certain predefined entities (characters) that it must escape, otherwise they would break the document. You just need to unescape the data when you consume it.