views:

67

answers:

1

I'm working on a first symfony project, i am using the sfWidgetFormTextareaTinyMCE widget for a form tinymce text area. It works fine, but while retrieving from database, instead of showing me the formated text, i have the <strong>,<p>,<br>tags in the text. help me please

+3  A: 

You have output escaping turned on in your application. To avoid it for that specific output you can use the $sf_data->getRaw() method available in your templates like this:

<?php echo $sf_data->getRaw('html'); ?>

That is assuming that the raw HTML you wanted to display is stored in $html within the template by your action:

$this->html = $object->getHtml();

Hope that helps.

Cryo
when i am using this.. i am getting this below error.Notice: Undefined index: html in lib\vendor\symfony\lib\escaper\sfOutputEscaperArrayDecorator.class.php on line 174what to do with this?? please help.. thanks in advance
@vesselyp Your value is most likely not stored in a variable called 'html', you should change the string to match the name of the variable that the value is stored in. I store the value in 'html' by using '$this->html = ""' which is why I reference 'html'.
Cryo