Hi there - I have a website selling advertising and a customer has an affiliate link with PHP in the URL. Now... when I come to validate it (http://validator.w3.org), obviously it tells me it needs to be "&" but this then stops the URL functioning. Does anyone know what you need to do to ensure it is XHTML 1.0 validated? Thanks guys!
Are you sure about that? If I post the following URL on DigitalPoint, the forum software will replace the & by an & (look at the page source) and the URL will still work properly: http://www.google.ca/search?hl=en&q=test
Yes - but that will not be Valid XHTML 1.0 - Please visit www.you-cubez.com - and in the bottom right hand corner I have "valid XHTML 1.0 | Valid CSS" - Click the XHTML 1.0 link you will see what I mean. Thanks for your help
I saw what you mean, but I maintain that the link I posted above is valid XHTML. If you look at this thread's page source, you will see that above link has the following HTML: <a href="http://www.google.ca/search?hl=en&q=test" target="_blank">http://www.google.ca/search?hl=en&q=test</a> Code (markup): So there is an & in the HTML source and the browser still processes the URL correctly. A validation of this thread page shows various XHTML errors, but none relating to an "&" in an URL: http://validator.w3.org/check?uri=http://forums.digitalpoint.com/showthread.php?t=251174
Hmm... Well W3 cannot validate my code with '&' in the PHP URL... there must be a way around it though...
The solution has been posted twice now. It's not that hard. Replace all & with & in your source code and the problem is fixed.