Add <pre> to the list of acceptable tags so that code blocks work

This commit is contained in:
Danielle McLean 2017-12-19 14:38:06 +11:00
parent 7b4f5d3ac1
commit cd075a8ce2
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -5,7 +5,7 @@ from django.utils.safestring import mark_safe
from bleach.sanitizer import Cleaner, ALLOWED_TAGS
from bleach.linkifier import LinkifyFilter
tags = ['code', 'p', 'img', 'span']
tags = ['code', 'p', 'pre', 'img', 'span']
tags.extend(ALLOWED_TAGS)
attributes = {
'a': ('href', 'title', 'class'),