8000 [UPGRADE] Mention the CSS strategy and it's effects · xabbuh/symfony@8b891ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b891ff

Browse files
wouterjfabpot
authored andcommitted
[UPGRADE] Mention the CSS strategy and it's effects
1 parent abd9b72 commit 8b891ff

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

UPGRADE-2.7.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,3 +534,33 @@ Validator
534534
* The PHP7-incompatible constraints (Null, True, False) and related validators
535535
(NullValidator, TrueValidator, FalseValidator) are marked as deprecated
536536
in favor of their `Is`-prefixed equivalent.
537+
538+
TwigBundle
539+
----------
540+
541+
* The `Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy` is deprecated and no longer
542+
used in favor of `Twig_FileExtensionEscapingStrategy`. This means that CSS files automatically
543+
use the CSS escape strategy. This can cause different behaviour when outputting reserved
544+
characters.
545+
546+
Before:
547+
548+
```css
549+
{# styles.css.twig #}
550+
551+
{# with brand_color: '#123456' #}
552+
body {
553+
background: {{ brand_color }};
554+
}
555+
```
556+
557+
After:
558+
559+
```css
560+
{# styles.css.twig #}
561+
562+
{# with brand_color: '#123456' #}
563+
body {
564+
background: {{ brand_color|raw }};
565+
}
566+
```

0 commit comments

Comments
 (0)
0