开发者

In Django, is there a built in filter which can mark these as safe?

> <strong>

HTML tags, and much more (these 3 are just examples)

Is there a filter that I actually render these in Django template, but开发者_C百科 keep tags escaped.


No, there isn't - if you mark something as safe, nothing will be escaped. If it's unsafe, everything will be. There isn't really way to say this content is varying degrees of safe - so if you want this, you'll have to write it yourself.


This should help but not bundled with Django:

http://djangosnippets.org/snippets/295/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜