【问题标题】:getRawValue() without formatting? SymfonygetRawValue() 没有格式化? Symfony
【发布时间】:2011-08-15 15:58:54
【问题描述】:

对于数据库,我用 html 添加文本,例如:

<i>test test </i> <strong>test test</strong>

在模板中我使用 $text->getBody()->getRawValue() 并且我已经格式化了文本:

测试测试 测试测试

如果我只使用 $text->getBody() 那么我在模板中:

<i>test test </i> <strong>test test</strong>

我如何在没有 getRawValue() 的情况下呈现文本,但我希望他没有 html 标签强,我等:

 test test test test

【问题讨论】:

    标签: php html symfony1 symfony-1.4


    【解决方案1】:

    你在关注strip_tags()吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-06
      • 2012-08-19
      • 1970-01-01
      • 1970-01-01
      • 2020-10-27
      • 2010-10-07
      相关资源
      最近更新 更多