Log in

View Full Version : Encode URL for use with W3C validator check referrer link



JasonDFR
12-22-2008, 05:05 PM
<a href="http://<?php echo urlencode("maps.google.fr/maps?f=q&hl=fr&geocode=&q=limoges&sll=47.15984,2.988281&sspn=19.97465,57.128906&ie=UTF8&z=11&g=limoges&iwloc=addr"); ?>">Limoges</a>

I am using the above in an attempt to get the url to validate W3C XHTML 1.0 Strict. It is not working. Is there a solution? This is when I use a check referrer link.

When the source is copied and pasted directly into the W3C validator page, it validates with no errors because the url is properly encoded in the source.

Also, this is the link as it appears in the source:
<a href="http://maps.google.fr%2Fmaps%3Ff%3Dq%26hl%3Dfr%26geocode%3D%26q%3Dlimoges%26sll%3D47.15984%2C2.988281%26sspn%3D19.97465%2C57.128906%26ie%3DUTF8%26z%3D11%26g%3Dlimoges% 26iwloc%3Daddr">Limoges</a>

Clicking on that link results in an "address not found" error.

Any ideas?

Thanks!

Medyman
12-22-2008, 06:02 PM
Please don't double post. Check your other thread regarding this.