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 {% autoesc

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

2011-06-13 Thread Thomas
Hello Christophe, In my showNews.html.twig i have : {% block content %} {{ news.titre }} Published on {{ news.dateCreation.format('d F Y') }}. {{ news.contenu }} {% endblock %} and in my head i've the meta : -- If you want to report a vulnerability issue on symfony, please send it to secur

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: [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);

[symfony-users] [sf2] Html Escaping

2011-06-13 Thread Thomas
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 (!$news) { throw $this->createNotFou