tmpvar/jsdom — pull request #491 by andrewplummer (2012-09-07 16:58:46+00:00)
Title: Check for node type before calling normalize.

andrewplummer/Sugar defines a method `normalize` on strings. Lines 165-199 of `html.js` appear to step through the attributes of a node, and call a a `normalize` method that is intended to be defined elsewhere in an "attribute" object. That in itself should not be an issue, but it appears that certain attributes may in fact be strings. I am currently encountering this in the `src` attribute of `img` nodes, however interestingly not all node attributes exhibit this behavior, for example `type` attributes on `input` elements are fine. At any rate it seems that either strings are not intended here or `n.normalize` should be performing a type check before calling that method.

Note that this is currently being tested using Apricot and node. This will fix andrewplummer/Sugar#188