MyIntervals / emogrifier

Converts CSS styles into inline style attributes in your HTML code.
https://www.myintervals.com/emogrifier.php
MIT License
907 stars 154 forks source link

[BUGFIX] Skip any style elements with null value, but still remove them #1226

Closed JakeQZ closed 1 year ago

JakeQZ commented 1 year ago

Psalm indicates that DOMNode::nodeValue could be null, perhaps for entirely empty <style> elements.

If such are encountered during pre-processing, still remove them from the DOM, but don't append their contents to the CSS to be inlined with extra line-breaks.

oliverklee commented 1 year ago

@JakeQZ Could you please rebase, resolve the merge conflicts, and repush? Thanks!