Forum Moderators: open

Message Too Old, No Replies

Validating with anchor query string

XHTML 1.0 Strict

         

photon

11:08 pm on Jun 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a page which has the following anchor:

<a href="http://www.amappingsite.com/maps/map.adp?city=Somewhere&state=SW&address=Main Street&zip=XXXXX&country=us&zoom=6">

When I try to validate the site to XHTML 1.0 Strict I get several errors like this:

cannot generate system identifier for general entity "state" 

How can I change the query string so that the validator isn't expecting the "&" to be the beginning of an SGML entity?

Thanks.

outrun

11:14 pm on Jun 22, 2003 (gmt 0)

10+ Year Member



Change your "&" to "&amp;" or "%26" this should fix it.

regards,
Mark

<added> ";" in "&amp;" </added>

[edited by: outrun at 11:19 pm (utc) on June 22, 2003]

photon

11:16 pm on Jun 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay, duh. Sorry, stupid question.

For some reason I was thinking that since it was in a query string it was a special case.

Thanks for the quick answer Mark.

g1smd

11:31 pm on Jun 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Make it:

<a href="http://www.amappingsite.com/maps/map.adp?city=Somewhere&amp;state=SW&amp;address=Main Street&amp;zip=XXXXX&amp;country=us&amp;zoom=6" title="some text about the link">

The browser is clever enough to unescape what it then sends to the web server from this.

.

<edit>Must type faster</edit>