Skip to content

Commit

Permalink
use v7
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Jul 26, 2023
1 parent d71c772 commit 21fa5df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"silverstripe/vendor-plugin": "^2",
"silverstripe/framework": "^5",
"symbiote/silverstripe-gridfieldextensions": "^4",
"pelago/emogrifier": "^6|^7",
"pelago/emogrifier": "^7",
"composer/ca-bundle": "*"
},
"require-dev": {
Expand Down
6 changes: 1 addition & 5 deletions src/EmailUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ class EmailUtils
*/
public static function inline_styles($html, $css = '')
{
if ($css) {
$domDocument = CssInliner::fromHtml($html)->inlineCss($css)->getDomDocument();
} else {
$domDocument = CssInliner::fromHtml($html)->getDomDocument();
}
$domDocument = CssInliner::fromHtml($html)->inlineCss($css)->getDomDocument();

HtmlPruner::fromDomDocument($domDocument)->removeElementsWithDisplayNone();
$html = CssToAttributeConverter::fromDomDocument($domDocument)
Expand Down

0 comments on commit 21fa5df

Please sign in to comment.