Three Minute Gripe: Coding.

I’m giving myself three minutes to vent on things.
This session, it’s about code.

We’re in the AJAX and XHTML age.
Please spend a little more time on going through your code, to make sure it can pass through a validator.
Missing one or two things, but generally getting the rest right is to be expected, and doesn’t bother me.

What gets me is the ampersand.
People seem to forget that in XHTML, the ampersand needs to be escaped, or changed into an entity.
It’s not just the ‘&’ by itself now. It’s now an ‘&’ when you’re putting links in that perform queries, like the social bookmark plugins generally do.

Please, please, just remember to do that, and it’ll spare me an extra five or twenty errors per page when I try to validate it.
Thanks.

[tags]XHTML, PHP, WordPress Plugins, Ampersand, Valid Code[/tags]

Tags: , ,

I do this all the time. Sorry. :)

>>1
Surprisingly, Doug, it wasn’t you who caused this. :)
I had a different Social Bookmarking plugin, as well as more ads from Project Wonderful on my blog a few days ago, and the amount of errors the two were turning up together were just that bad.
It’s easy to forget an alt attribute on an image. I’ve done it many times.
It’s mostly the ampersand that manages to peeve me since it’s an easy fix that, when missing, generates annoying errors in twos. :)

(Now, if only I had a plugin that managed to send email replies to note people when there’s a comment to their comment. I’ve given up on threaded comments. :P)

Actually, that’s been that way for a fair long time now, not just XHTML. I believe this was decided along in HTML 3, but fairly ignored. Perhaps it only came in at 4.