Permit span[class] in bleached content

This commit is contained in:
Danielle McLean 2017-11-06 16:06:25 +11:00
parent 1762b102fb
commit 5c643299c7
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -5,11 +5,12 @@ from django.utils.safestring import mark_safe
from bleach.sanitizer import Cleaner, ALLOWED_TAGS
from bleach.linkifier import LinkifyFilter
tags = ['code', 'p', 'img']
tags = ['code', 'p', 'img', 'span']
tags.extend(ALLOWED_TAGS)
attributes = {
'a': ('href', 'title', 'class'),
'img': ('alt', 'src', 'title'),
'span': ('class',),
}
register = template.Library()