Skip to content

Commit bd21fa7

Browse files
committed
Checked the content is HTML before applying inline styles.
1 parent 92d8854 commit bd21fa7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

View/Helper/InlineCssHelper.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ public function afterLayout($layoutFile) {
1515

1616
$content = $this->_View->Blocks->get('content');
1717

18+
// We only want to apply inline CSS to HTML emails, so first check if
19+
// the content is HTML before proceeding.
20+
if ($this->isHtml($content) === false) {
21+
return;
22+
}
23+
1824
if (!isset($this->InlineCss)) {
1925
$this->InlineCss = new CssToInlineStyles();
2026
}

0 commit comments

Comments
 (0)