Thanks Justin,

It's clear to me. But what I can't figure out is why I've never noticed this one before? Really...I'm just amazed this hasn't crossed my path before...

It will probably only take a couple of hours to make all the changes, not very much in the grand scheme of things...v


On 12 May 2004, at 17:29, Justin French wrote:


Vaska,

The answer is simple. Your URLs contain ampersands (&), which are a character which cannot be used directly in HTML. Why? Because it's used for entities, like & and © and —.

Without boring you with the details, you need to use "?month=4&year=2004&a=Home", not "?month=4&year=2004&a=Home" to pass validation (hence write well-formed HTML).

No, the validator is not broken or wrong.
Yes, I know every book tells you to use a plain ampersand.
Yes I know it works in most browsers and situations today, but plain ampersands are not correct :)


If it's a huge deal to re-write your application at this point, you might consider writing a quick function (in PHP, I'd use ob_start() with a call back function with a regex to replace all the problematic ampersands in URLs on the way to the browser), but your mileage may vary. You're better off getting it right now, rather than relying on such a beast.

Justin

*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************


Reply via email to