try this
$sf_data->getRaw('sf_user')->getFlash('msg');
or this
$sf_user->getFlash('msg', ESC_RAW);
http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping
On Apr 22, 3:09 pm, FÁSI Gábor <[email protected]> wrote:
> The problem is caused by the automatic escaping of any data passed
> from the controller to the view (including the flash), that you have
> enabled while generating the application.
> One way to work around it is to disable escaping entirely, but then
> you'll have to do this manually, or to get the data somehow unescaped.
> I do not know a way to do this, but hopefully someone smarter will
> tell us :)
>
> On Wed, Apr 22, 2009 at 10:23, Ahmed <[email protected]> wrote:
>
> > Also the generated html of the message seems to be correct (but the
> > browser display him as a string)
> > Best glance;)
>
> > On 21 avr, 19:25, Dheeraj Kumar Aggarwal <[email protected]>
> > wrote:
> >> Hi Ahmed,
>
> >> At my side this is working
>
> >> i have used in actions class
> >> $msg = "<a href=\"some-url\">display msg</a>";
> >> and then set the flash message by
> >> $this->getUser()->setFlash('msg', $msg);
>
> >> then i am retrieving it in templates as
> >> $sf_user->getFlash('msg');
>
> >> and it is working fine.....
>
> >> On Tue, Apr 21, 2009 at 9:31 PM, Ahmed <[email protected]> wrote:
>
> >> > Hi all ;
> >> > i have a simple message Where i store a html message with <br> and <a>
> >> > tag .
> >> > When i try to display it (in the layout ) with echo $sf_user->getFlash
> >> > ('msg') ,she not recognize any html tag an display them as a string .
> >> > How can i correct this ? .
> >> > Cordialy Ahmed .
>
> >> --
> >> Regards,
> >> Dheeraj
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---