From 17ef7e3a65a3fa5325bbe4d7c69537d5e6418220 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 14 Dec 2019 07:39:10 +0000 Subject: [PATCH] Whitelist more html tags --- apiserver/utils.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apiserver/utils.py b/apiserver/utils.py index 6546187..d4cfeb5 100644 --- a/apiserver/utils.py +++ b/apiserver/utils.py @@ -1,6 +1,5 @@ import logging -logging.basicConfig( - format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', +logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG) import commonmark @@ -41,6 +40,18 @@ ALLOWED_TAGS = [ 'summary', 'br', 'pre', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'table', + 'thead', + 'tr', + 'th', + 'td', + 'tbody', ] clean = Cleaner(tags=ALLOWED_TAGS).clean