cgross / grunt-dom-munger

Grunt task to read and manipulate HTML with CSS selectors.
MIT License
93 stars 40 forks source link

Pass xmlMode option to cheerio #10

Closed caillou closed 10 years ago

caillou commented 10 years ago

Cheerio transforms all attributes into lower case when it loads with the xmlMode="false" option.

This breaks the svg.viewBox attribute. Ideally, we should be able to pass the xmlMode into grunt-dom-munger.

cgross commented 10 years ago

Thanks for the report. I went ahead and used the more specific lowerCaseAttributeNames option rather than pass xmlMode as an option. I'm wary of using the xmlMode option when most html is not valid xml. This option solves the problem and doesn't require adding an extra option. I'll push to npm soon.