andrewrk/juice — pull request #9 by jrit (2014-05-27 19:50:17+00:00)
Title: Add option applyWidthAttributes to API

This addresses the issue where some mail clients, like Outlook, require there to be a `width` attribute defined on images in order to set a width other than the natural width. The change is setup so that an option has been added `applyWidthAttributes` and when set to `true` (the default is `false` to maintain backward compatibility) the `width` attribute on elements of types in the new `juice.widthElements` array (default is [TABLE, TD, IMG]) are set to any pixel width CSS values applied to those elements.

This change removes the need to set widths in CSS and again in HTML for some elements, so code is DRYer and behaves closer to browser CSS.

I don't believe this change to be breaking, a new test has been added and all preexisting tests pass without changes.