Ampersands are Insidious
David Ascher: Ampersands, as I’ve mentioned before, are really nice letters — they have a great typographical history, they’re wonderfully flexible creative outlets for font designers, and they’re quite useful to the writer. However, they sure do get in the way of a lot of code, especially when it comes to HTML and XML toolchains.
What makes ampersands worse than Unicode is two things:
- there is no way to inspect a string and determine a priori whether or not it is entity encoded — unlike punicode and utf-8 where you have a fighting chance to get it right.
- most consuming software is too forgiving, and will compensate for lack of appropriate encoding.
An example: the src
attribute of
script
element people use to reference the javascript
for Flickr.