ABC News: All That Glitters

Web Standards Project member Ethan Marcotte comments on the recently redesigned ABC News website, noting (among other things) that unencoded ampersands are not as harmless as many would like them to be.

D. Keith Robinson also noted this WaSP Buzz, and I left a comment over at Asterisk, which I’ll repeat here.

Yes, moving towards web standards, even without achieving 100% validation, is great. Much, much better than sticking with tag soup. And getting it all right, all at once, on a site that huge, is all but impossible. Great job, Mike!

That said, if you decide to shrug your shoulders at unencoded ampersands, just be aware that they may cause real world problems. It’s not very common, but it does happen.

And no, I’m not a validation junkie, even though I always try hard to make sure any sites I build are valid (until they leave my hands, at which point it may be difficult to maintain validation for reasons beyond my control). I’m just pointing out that encoding ampersands is better than not encoding them, and that not doing so could cause you problems.

The bottom line is this: if it is within your power to make sure ampersands are encoded, do it. If you are not allowed to touch them, you may do well to let whoever is responsible know about the potential problems, and hope all goes well.

Posted on October 12, 2004 in Web Standards, Web Standards

Comments

  1. Inspired by your example I’v hacked out an extended version of it. Here you can see how php script actully interprets such link. Instead of 14 variables you have got id having veird value glued of other supposed-to-be variables…

  2. October 12, 2004 by Roger Johansson (Author comment)

    Nice demo. I had something similar happen to me once. That’s when I learned my lesson ;) Not that it always helps to know what you should do. Having worked on some large sites, I do see how it can be very hard, even impossible, to have total control of every part of a site, where content is pulled in from various sources, and different departments need to cooperate.

  3. Just ot of curiosity, which entity was it? I see ® and § as ones which can happen most often.

  4. October 12, 2004 by Roger Johansson (Author comment)

    If I remember correctly, it was ⟨ (⟨). It was being used to keep track of which language a site should be displayed in.

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.