Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd21fa7

Browse files
committedFeb 2, 2016
Checked the content is HTML before applying inline styles.
1 parent 92d8854 commit bd21fa7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎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)
Please sign in to comment.