[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
thx wissl - it works: $raw_person = $sf_data->getRaw('person'); echo $raw_person['description']; On 18 Paź, 16:23, wissl wrote: > what class is the instance $person of? for doctrine somethine like > this should work: > > echo $person->getRawValue()->description; > > if it is a simple array you

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread wissl
what class is the instance $person of? for doctrine somethine like this should work: echo $person->getRawValue()->description; if it is a simple array you could do something like this: $raw_person = $sf_data->getRaw('person'); echo $raw_person['description']; Best way is to var_dump the objec

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
$sf_data->getRaw("person[description]"); also doesn't work - strange... Do You use symfony 1.2.9 ?? On 18 Paź, 15:41, Gábor Fási wrote: > Just a hinch: have you tried `$sf_data->getRaw("person[description]");` ? > Also, you may try to var_dump $sf_data, might give you some more info > about ac

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread Gábor Fási
Just a hinch: have you tried `$sf_data->getRaw("person[description]");` ? Also, you may try to var_dump $sf_data, might give you some more info about accessing the variables, if my hinch doesn't work out. Never used getRaw(), I alway echo data from propel, and use something like `$object->getBody(

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
I have tried: echo $sf_data->getRaw('description'); and echo $sf_data->getRaw($person['description']); and still the same error - maybe this is some bug in symfony 1.2.9 ? On 18 Paź, 14:04, Tom Boutell wrote: > Mini, Gabor used "test" as an example, use your field name (description). > > As Min

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread Tom Boutell
Mini, Gabor used "test" as an example, use your field name (description). As Mini pointed out you need to filter the content to remove JavaScript, XSS attacks, bad CSS that trashes the layout of the page, etc. (unless the only person entering it is trusted, and maybe even then to cut down on tedi

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
Are You sure ? After wrote: echo $sf_data->getRaw('test'); I have an error: Notice: Undefined index: test in C:\Program Files\WebServ\httpd \symfony-1.2.9\lib\view\escaper \sfOutputEscaperArrayDecorator.class.php on line 162 On 18 Paź, 11:12, Gábor Fási wrote: > http://www.symfony-project.org/b

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread Gábor Fási
http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_sub_activating_output_escaping echo $sf_data->getRaw('test'); Make sure you cleanse the content to avoid html injection and xss. On Sun, Oct 18, 2009 at 09:42, mini_alexander wrote: > > I use rich text editor - tin