@@ -30,22 +30,20 @@ Template Locations
3030 Store all your application's templates in ``app/Resources/views/ `` directory.
3131
3232Traditionally, Symfony developers stored the application templates in the
33- ``Resources/views/ `` directory of each bundle. Then they used the logical name
34- to refer to them (e.g. ``AcmeDemoBundle: Default: index.html.twig ``).
33+ ``Resources/views/ `` directory of each bundle. Then they used the Twig namespaced
34+ path to refer to them (e.g. ``@AcmeDemo/ Default/ index.html.twig ``).
3535
3636But for the templates used in your application, it's much more convenient
3737to store them in the ``app/Resources/views/ `` directory. For starters, this
3838drastically simplifies their logical names:
3939
40- ================================================= ==================================
41- Templates Stored inside Bundles Templates Stored in ``app/ ``
42- ================================================= ==================================
43- ``AcmeDemoBundle:Default:index.html.twig `` ``default/index.html.twig ``
44- ``::layout.html.twig `` ``layout.html.twig ``
45- ``AcmeDemoBundle::index.html.twig `` ``index.html.twig ``
46- ``AcmeDemoBundle:Default:subdir/index.html.twig `` ``default/subdir/index.html.twig ``
47- ``AcmeDemoBundle:Default/subdir:index.html.twig `` ``default/subdir/index.html.twig ``
48- ================================================= ==================================
40+ ============================================ ==================================
41+ Templates Stored inside Bundles Templates Stored in ``app/ ``
42+ ============================================ ==================================
43+ ``@AcmeDemo/index.html.twig `` ``index.html.twig ``
44+ ``@AcmeDemo/Default/index.html.twig `` ``default/index.html.twig ``
45+ ``@AcmeDemo/Default/subdir/index.html.twig `` ``default/subdir/index.html.twig ``
46+ ============================================ ==================================
4947
5048Another advantage is that centralizing your templates simplifies the work
5149of your designers. They don't need to look for templates in lots of directories
@@ -131,7 +129,7 @@ service in the constructor of the Twig extension:
131129 new \Twig_SimpleFilter(
132130 'md2html',
133131 array($this, 'markdownToHtml'),
134- array('is_safe' => array('html'))
132+ array('is_safe' => array('html'), 'pre_escape' => 'html' )
135133 ),
136134 );
137135 }
0 commit comments