开发者

how to get a formatted text output with no html tags (in symfony)?

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 开发者_如何学Chave the <strong>,<p>,<br>tags in the text. help me please


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜