From 1011b67f0abbb71a9550ccca7635487f99799000 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 7 Dec 2017 18:33:33 +0100 Subject: [PATCH] Fix markup in emails: Consistently allow
 in markdown
 content

---
 doc/user/markdown.rst                     | 2 +-
 src/pretix/base/templatetags/rich_text.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/user/markdown.rst b/doc/user/markdown.rst
index 6de7284194..4a5074c5b9 100644
--- a/doc/user/markdown.rst
+++ b/doc/user/markdown.rst
@@ -145,7 +145,7 @@ to get a better plain text representation of your text. Note however, that for
 security reasons you can only use the following HTML elements::
 
     a, abbr, acronym, b, br, code, div, em, h1, h2,
-    h3, h4, h5, h6, hr, i, li, ol, p, span, strong,
+    h3, h4, h5, h6, hr, i, li, ol, p, pre, span, strong,
     table, tbody, td, thead, tr, ul
 
 Additionally, only the following attributes are allowed on them::
diff --git a/src/pretix/base/templatetags/rich_text.py b/src/pretix/base/templatetags/rich_text.py
index b5b070db35..1057d74ce8 100644
--- a/src/pretix/base/templatetags/rich_text.py
+++ b/src/pretix/base/templatetags/rich_text.py
@@ -42,6 +42,7 @@ ALLOWED_TAGS = [
     'h4',
     'h5',
     'h6',
+    'pre',
     # Update doc/user/markdown.rst if you change this!
 ]