【问题标题】:RedBeanPHP is not storing a bean with html entityRedBeanPHP 不存储带有 html 实体的 bean
【发布时间】:2011-10-06 19:07:51
【问题描述】:

如果我在 textarea 中输入 rsquo; 并通过 R::store() 保存它,它会将其保存到数据库中。

如果我编辑这篇文章,它会显示',如果我点击保存,RedBean 将删除引用并存储空 bean。

我能做什么?

【问题讨论】:

    标签: php redbean


    【解决方案1】:

    在将其返回给R::store()之前对其进行编码。参见htmlentities

    但是,如果您自己从未致电 html_entity_decode,我猜您在其他地方犯了一些错误,而您的 ' 是该错误的结果。

    【讨论】:

      猜你喜欢
      • 2012-10-18
      • 1970-01-01
      • 1970-01-01
      • 2012-06-28
      • 1970-01-01
      • 2019-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多