Skip to content

Commit 9f35368

Browse files
maryofabpot
authored andcommitted
Modified guessDefaultEscapingStrategy to not escape txt templates
Useful for plaintext emails.
1 parent 9b99f09 commit 9f35368

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Bundle/TwigBundle/TwigEngine.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public function guessDefaultEscapingStrategy($filename)
5757
if ('js' === $format) {
5858
return 'js';
5959
}
60+
61+
if ('txt' === $format) {
62+
return false;
63+
}
6064

6165
return 'html';
6266
}

0 commit comments

Comments
 (0)