Skip to content

Commit

Permalink
Dev: added Twig_Extension_Escaper extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jan 19, 2017
1 parent 96370fc commit 4134538
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 5 additions & 6 deletions application/config/internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,15 @@

// All parameters below are optional, change them to your needs
'fileExtension' => '.twig',
'options' => array(
'autoescape' => true,
'options' => array(
'debug' => defined('YII_DEBUG') && YII_DEBUG ?true:false,
),
// Those extensions, include the sendbox, will be done later in the process
'extensions' => array(
'LS_Twig_Extension',
'Twig_Extension_Sandbox',
'Twig_Extension_StringLoader',
'Twig_Extension_Debug',
'Twig_Extension_Escaper',
),
'globals' => array(
'html' => 'CHtml'
Expand All @@ -222,7 +221,7 @@
'gT' => 'gT',
),
'sandboxConfig' => array(
'tags' => array('if', 'for', 'set'),
'tags' => array('if', 'for', 'set', 'autoescape'),
'filters' => array('escape', 'raw', 't', 'merge', 'length', 'gT'),
'methods' => array(
'ETwigViewRendererStaticClassProxy' => array("textfield", "form", "link", "emailField", "beginForm", "endForm", "dropDownList", "htmlButton" ),
Expand All @@ -233,8 +232,8 @@
'ETwigViewRendererYiiCoreStaticClassesProxy'=>array("Html"),
'LSYii_Application' => array("request"),
),
'functions' => array('include', 'dump', 'flatEllipsizeText', 'getLanguageData', 'array_flip', 'array_intersect_key', 'registerPublicCssFile', 'getAllQuestionClasses','intval')
)
'functions' => array('include', 'dump', 'flatEllipsizeText', 'getLanguageData', 'array_flip', 'array_intersect_key', 'registerPublicCssFile', 'getAllQuestionClasses','intval'),
),

// Change template syntax to Smarty-like (not recommended)
// Could be use to manage potential conflict with Expression Manager
Expand Down
1 change: 0 additions & 1 deletion templates/default/views/layout.twig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
NOTE: if you think we should we should provide more functions, variables, etc, feel free to ask
#}

<!DOCTYPE html>
<html lang="{{ aSurveyInfo.languagecode }}" dir="{{ aSurveyInfo.dir }}" class="no-js {{ aSurveyInfo.languagecode }} dir-{{ aSurveyInfo.dir }} ">

Expand Down

0 comments on commit 4134538

Please sign in to comment.