Re : Re: [symfony-users] [sf2] Html Escaping

2011-06-14 Thread Thomas
I've fixed my problem, In the Twig documentation (http://www.twig-project.org/doc/templates.html) i've found this : {% autoescape false %} Everything will be outputed as is in this block{% endautoescape %} So like Chirstophe said, the output escaping is enabled by default. Adding {%

Re: [symfony-users] [sf2] Html Escaping

2011-06-13 Thread Christophe COEVOET
Le 13/06/2011 18:21, Thomas a écrit : I all, i've a problem when rendering a news in a twing template. My html isn't escaped : public function showAction($permalink){ $news = $this-get('doctrine') -getEntityManager() -getRepository('CompanySiteBundle:News') -findOneByPermalink($permalink); if

Re: [symfony-users] [sf2] Html Escaping

2011-06-13 Thread oscar balladares
Hi, if have worked with Twig or Symfony 1.4 way to pass variables from controllers to views, it is the same for all cases. In a controller you will return a view response like: return $this-render('YourBundle:Folder:view.html.php', array('viewBar' = $controllerBar, 'viewFoo' = $controllerFoo));

Re : Re: [symfony-users] [sf2] Html Escaping

2011-06-13 Thread Thomas
Hello Christophe, In my showNews.html.twig i have : {% block content %} h2{{ news.titre }}/h2 div id=date_news iPublished on {{ news.dateCreation.format('d F Y') }}./i /div {{ news.contenu }} {% endblock %} and in my head i've the meta : meta http-equiv=Content-Type content=text/html;