From e1440f6a7aefcd73ba5df2aedc714f5c1865b727 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Sun, 17 May 2015 15:00:45 +0200 Subject: [PATCH 1/2] Mention about CSS strategy --- UPGRADE-2.7.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/UPGRADE-2.7.md b/UPGRADE-2.7.md index 7d532cf3227a9..63e42b314f60d 100644 --- a/UPGRADE-2.7.md +++ b/UPGRADE-2.7.md @@ -534,3 +534,33 @@ Validator * The PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) are marked as deprecated in favor of their `Is`-prefixed equivalent. + +TwigBundle +---------- + + * The `Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy` is deprecated and no longer + used in favor of `Twig_FileExtensionEscapingStrategy`. This means that CSS files automatically + use the CSS escape strategy. This can cause different behaviour when outputting reserved + characters. + + Before: + + ```css + {# styles.css.twig #} + + {# with brand_color: '#123456' #} + body { + background: {{ brand_color }}; + } + ``` + + After: + + ```css + {# styles.css.twig #} + + {# with brand_Color: '#123456' #} + body { + background: {{ brand_color|raw }}; + } + ``` From 0bf80961545d0899dcc30b26b666e6ab5d37d3ee Mon Sep 17 00:00:00 2001 From: Wouter J Date: Sun, 17 May 2015 15:08:46 +0200 Subject: [PATCH 2/2] Fix typo --- UPGRADE-2.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE-2.7.md b/UPGRADE-2.7.md index 63e42b314f60d..3a9884d97dd1d 100644 --- a/UPGRADE-2.7.md +++ b/UPGRADE-2.7.md @@ -559,7 +559,7 @@ TwigBundle ```css {# styles.css.twig #} - {# with brand_Color: '#123456' #} + {# with brand_color: '#123456' #} body { background: {{ brand_color|raw }}; }