allow details tags #1

Merged
00dani merged 1 commit from BenLubar/lemoncurry:details into master 2019-05-05 18:36:52 -04:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 73155f399b - Show all commits

View file

@ -2,10 +2,11 @@ from bleach.sanitizer import Cleaner, ALLOWED_TAGS
from bleach.linkifier import LinkifyFilter from bleach.linkifier import LinkifyFilter
from jinja2 import evalcontextfilter, Markup from jinja2 import evalcontextfilter, Markup
TAGS = ['cite', 'code', 'p', 'pre', 'img', 'span'] TAGS = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
TAGS.extend(ALLOWED_TAGS) TAGS.extend(ALLOWED_TAGS)
ATTRIBUTES = { ATTRIBUTES = {
'a': ('href', 'title', 'class'), 'a': ('href', 'title', 'class'),
'details': ('open',),
'img': ('alt', 'src', 'title'), 'img': ('alt', 'src', 'title'),
'span': ('class',), 'span': ('class',),
} }

View file

@ -5,10 +5,11 @@ 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 = ['cite', 'code', 'p', 'pre', 'img', 'span'] tags = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
tags.extend(ALLOWED_TAGS) tags.extend(ALLOWED_TAGS)
attributes = { attributes = {
'a': ('href', 'title', 'class'), 'a': ('href', 'title', 'class'),
'details': ('open',),
'img': ('alt', 'src', 'title'), 'img': ('alt', 'src', 'title'),
'span': ('class',), 'span': ('class',),
} }