Whoops, allow images in bleached content
This commit is contained in:
parent
e5d3af1b51
commit
53b7b86515
1 changed files with 3 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue