加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

XmlFormat()总是比htmlEditFormat()好吗?

发布时间:2020-12-16 05:33:50 所属栏目:百科 来源:网络整理
导读:今天发表评论: http://www.bennadel.com/blog/2004-Escaping-Form-Values-Understanding-The-ColdFusion-htmlEditFormat-Life-Cycle.htm by Rick Osborne I’ve started moving my students from htmlEditFormat over to xmlFormat . As you said,it catche
今天发表评论: http://www.bennadel.com/blog/2004-Escaping-Form-Values-Understanding-The-ColdFusion-htmlEditFormat-Life-Cycle.htm by Rick Osborne

I’ve started moving my students from
htmlEditFormat over to xmlFormat. As
you said,it catches more characters,
but it’s also useful for pure XML and
is faster to type. I haven’t been able
to come up with a compelling reason to
stick with htmlEditFormat.

我们都应该开始使用XmlFormat()吗?你能想到一个“令人信服的理由”,而不是表现稍慢吗?

更新:以下答案不再相关.我通过HTMLEditFormat()使用XMLFormat()注意到的是IE没有解释& an;从而造成严重破坏.

在我看来,如果它获得更多(例如Jason Dean指出的单引号)从而使你的应用更安全,那么我会吃掉性能.在所有现实中,有多少性能可能是…… 1或2ms?

在即将发布的cfwheels 1.1版本中,我添加了一个h()方法,它是htmleditformat()方法的包装器.在阅读了ben和这篇文章之后,我将把它切换为使用XMLFormat()代替.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读