Question

Online validator throws error on url in my XML page. Here is affected string:

http://some.normal.url?params=id%2Cburst%2Cfactor%2Ccp&exp=907031

error is pointed at place of second equal sign exp = 907031.

I searched before, and according some posts equal sign is not allowed, but then how first equal sign passed, and link won't work if I urlquote it.

What can I do here to bypass this error?

Was it helpful?

Solution

The ampersand is the problem. Ampersands in XML act as the start of an encoded character, so you need to encode the ampersand itself. E.g. &.
Change your complete URL to this:
http://some.normal.url?params=id%2Cburst%2Cfactor%2Ccp&exp=907031

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top