This Space for Rent

Stupidly trivial New Code!

flickr’s photo sharing spits out non-xhtml html for photo embedding, so if I embed my photos here I end up with pages that don’t validate on the w3c’s validator. There are a bunch of things that don’t validate, but the most egregious is that the <img> tags aren’t self-closing, which the validator screams bloody murder over.

So imgfix – only on github for now, because dumb and trivial – which walks files and adds a self-close to every unselfclosed <img/> tag it finds. There is still the problem of a flickr-only extended attribute (so the flickr image displaying javascript can find flickr images) and the occasional non-utf8 non-ascii character, but closing the <img> tags clears the vast majority of the errors that the w3c’s code finds.

Now I have to tweak the scripts around annotations so it automatically runs when I do a new post.