django-sanitizer icondjango-sanitizer 0.2

Django template filter application for sanitizing user submitted HTML
django-sanitizer is a Django app that allows only whitelisted tags and attributes through.

The setting ALLOWED_TAGS can override the behavior. The syntax of this setting is a space-separated list of tags, which are optionally followed by a colon and a comma-separated list of attribute permitted in the tag.

For example, to allow < a > tags which are links or named anchors, but not to allow definition of an onclick attribute:

    ALLOWED_TAGS = "a:href,name"

In your templates, sanitizing is easy.

    {% load sanitizer %}

    {{ user_comment|allowtags|safe }}

    {{ user_comment|allowtags:"b i"|safe }}


Disallowed tags or attributes are simply removed.

last updated on:
February 24th, 2012, 21:55 GMT
price:
FREE!
developed by:
Calvin Spealman
license type:
Other/Proprietary License
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT