Whoops, allow images in bleached content

This commit is contained in:
Danielle McLean 2017-10-29 19:35:57 +11:00
parent e5d3af1b51
commit 53b7b86515
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

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