Skip to content
This repository
Browse code

Set auto-escaping to false, since it breaks templates

  • Loading branch information...
commit 657933e39dbaff313646a8e3b0db3a369ca54e24 1 parent 5a86d3c
Justin Shepard authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  View/TwigView.php
2  View/TwigView.php
@@ -85,7 +85,7 @@ public function __construct(Controller $Controller) {
85 85 'cache' => TWIG_VIEW_CACHE,
86 86 'charset' => strtolower(Configure::read('App.encoding')),
87 87 'auto_reload' => Configure::read('debug') > 0,
88   - 'autoescape' => true,
  88 + 'autoescape' => false,
89 89 'debug' => Configure::read('debug') > 0
90 90 ));;
91 91

0 comments on commit 657933e

José Lorenzo Rodríguez

hmm, autoescaping is kinda the most desirable feature of Twig :(

Graham Weldon
'autoescape' => Configure::read('TwigView.autoescape') ?: true

Thats the solution I have at the moment, almost ready with a bunch of new changes for pushing.

justinshepard

Lorenzo, I agree. However, since Twig is escaping what it shouldn't be (ref. Issue #5), disabling autoescape is the only way to get templates to behave properly. I haven't spent much time trying to figure out why it's behaving that way, so instead I just use the |e filter when I need something escaped.

Please sign in to comment.
Something went wrong with that request. Please try again.