【发布时间】:2011-02-21 20:37:10
【问题描述】:
我有一个带有 TextField 的简单博客模型。 在 TextField 中保存链接的最佳方法是什么?
1) 以这种形式在数据库中保存链接:http://www.example.com 然后在模板中使用一些过滤器将其转换为形式:
<a rel="nofollow" href="http://www.example.com>http://www.example.com</a>
2)直接以这种形式将链接保存在数据库中:
<a rel="nofollow" href="http://www.example.com>http://www.example.com</a>
【问题讨论】: