Ampersand in link description text?

Posted by kitenski on Stack Overflow See other posts from Stack Overflow or by kitenski
Published on 2011-01-01T17:40:49Z Indexed on 2011/01/01 17:54 UTC
Read the original article Hit count: 312

Filed under:
|

I am validating my site using validator.w3.org and have an issue where there is a & in my link description text.

ie this is taken from the source

<a class='tag' href='/php/iphone software.php?function=developer&amp;dev=witch%26wizards+inc.&amp;store=143441'>witch&wizards inc.</a>

Which gives me this error in the validator

Line 188, Column 540: cannot generate system identifier for general entity "wizards" …6wizards+inc.&store=143441'>witch&wizards inc.

If I urlencode the description then the validation passes, but the user then sees the text displayed urlencoded, ie

Developer witch%26wizards+inc.

However I believe it's much more user friendly if this was displayed unencoded, ie

Developer witch&wizards inc.

Is there a way to pass validation but still have user friendly text displayed?

Thanks,

Greg

© Stack Overflow or respective owner

Related posts about php

Related posts about urlencode