My website is XHTML Transitional compliant except for one thing: the & (ampersand) in the URL are written as it is, instead of &
That is, all the urls in my pages are usually like this:
<a href="http://www.foo.com/page.aspx?x=1&y=2">Foo</a>
But XHTML validator generates this error:
cannot generate system identifier for general entity "y"
... and it wants the url to be written like this:
<a href="http://www.foo.com/page.aspx?x=1&y=2">Foo</a>
The problem is that IE and Firefox don't handle the URL correctly and ignore the y parameter. How can I make this link work and validate correctly?
It seems to me that it is impossible to write XHTML pages if the browsers don't work with strict encoded XHTML URLs.
Do you want to see in action? See the difference between these two links (copy and paste them as they are):
http://stackoverflow.com/search?q=ff&sort=newest
and
http://stackoverflow.com/search?q=ff&sort=newest
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…