Skip to content

Commit 61ebd56

Browse files
committed
Merge pull request #28 from wearejust/master
Feature: Remove deprecated reference + always cleanup the <style> block
2 parents 4955c29 + 9b065a3 commit 61ebd56

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/CssInlinerPlugin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ public function beforeSendPerformed(\Swift_Events_SendEvent $evt)
1414
$message = $evt->getMessage();
1515

1616
$converter = new CssToInlineStyles();
17-
$converter->setEncoding($message->getCharset());
1817
$converter->setUseInlineStylesBlock();
18+
$converter->setStripOriginalStyleTags();
19+
1920
$converter->setCleanup();
2021

2122
if ($message->getContentType() === 'text/html' ||

tests/stubs/converted-html.stub

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2-
<html><head><style>
3-
.block {
4-
width: 100px;
5-
height: 20px;
6-
}
7-
div.block ul li.small {
8-
margin: 10px;
9-
}
10-
</style></head><body>
11-
<div style="height: 20px; width: 100px;">
2+
<html><head><style></style></head><body>
3+
<div style="height: 20px; width: 100px;">
124
text
135

146
<ul><li>
157
Big list
168
</li>
17-
<li style="margin: 10px;">
9+
<li style="margin: 10px;">
1810
Small list
1911
</li>
2012
</ul></div>

0 commit comments

Comments
 (0)