TIMEX
TIMEX

Reputation: 272274

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 keep tags escaped.

Upvotes: 0

Views: 291

Answers (2)

gnrfan
gnrfan

Reputation: 19401

This should help but not bundled with Django:

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

Upvotes: 0

girasquid
girasquid

Reputation: 15506

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.

Upvotes: 1

Related Questions