forked from 00dani/lemoncurry
Permit span[class] in bleached content
This commit is contained in:
parent
1762b102fb
commit
5c643299c7
1 changed files with 2 additions and 1 deletions
|
@ -5,11 +5,12 @@ from django.utils.safestring import mark_safe
|
||||||
from bleach.sanitizer import Cleaner, ALLOWED_TAGS
|
from bleach.sanitizer import Cleaner, ALLOWED_TAGS
|
||||||
from bleach.linkifier import LinkifyFilter
|
from bleach.linkifier import LinkifyFilter
|
||||||
|
|
||||||
tags = ['code', 'p', 'img']
|
tags = ['code', 'p', 'img', 'span']
|
||||||
tags.extend(ALLOWED_TAGS)
|
tags.extend(ALLOWED_TAGS)
|
||||||
attributes = {
|
attributes = {
|
||||||
'a': ('href', 'title', 'class'),
|
'a': ('href', 'title', 'class'),
|
||||||
'img': ('alt', 'src', 'title'),
|
'img': ('alt', 'src', 'title'),
|
||||||
|
'span': ('class',),
|
||||||
}
|
}
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
Loading…
Reference in a new issue