Skip to content

Commit 98491d5

Browse files
AC-7896: Inline styles in transactional emails are broken
1 parent 6cc58f3 commit 98491d5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

lib/internal/Magento/Framework/Filter/Template.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,18 @@ private function processDirectives($value, $isSigned = false): array
274274
foreach ($constructions as $construction) {
275275
$replacedValue = $directiveProcessor->process($construction, $this, $this->templateVars);
276276

277-
$results[] = [
277+
$result = [
278278
'directive' => $construction[0],
279279
'output' => $replacedValue
280280
];
281+
282+
if (count($this->afterFilterCallbacks) > 0) {
283+
$result['callbacks'] = $this->afterFilterCallbacks;
284+
285+
$this->resetAfterFilterCallbacks();
286+
}
287+
288+
$results[] = $result;
281289
}
282290
}
283291
}
@@ -308,6 +316,12 @@ private function applyDirectivesResults(string $value, array $results): string
308316

309317
$value = str_replace($result['directive'], $result['output'], $value);
310318

319+
if (isset($result['callbacks'])) {
320+
foreach ($result['callbacks'] as $callback) {
321+
$this->addAfterFilterCallback($callback);
322+
}
323+
}
324+
311325
$processedResults[] = $result;
312326
}
313327

0 commit comments

Comments
 (0)