Took a closer look at this: the problem is that html::clean_attribute only works on one attribute and we have an array of them (which is also why thumb_img and resize_img don't use them).  Seems like I should write a new function called html::clean_attributes()...

In the interest of not having conflicting commits, can we pull this now and I'll jump into fixing that right afterward?