From eaf8485b71f7397c80b267cd4253f01d8a572137 Mon Sep 17 00:00:00 2001 From: zPlus Date: Fri, 5 Jun 2020 07:44:26 +0200 Subject: [PATCH] Whitelist "hr" HTML tag. --- freepost/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freepost/__init__.py b/freepost/__init__.py index 29c8dfb0..8e185002 100755 --- a/freepost/__init__.py +++ b/freepost/__init__.py @@ -66,7 +66,7 @@ template = functools.partial ( # "bleach" library is used to sanitize the HTML output of jinja2's "md2html" # filter. The library has only a very restrictive list of white-listed # tags, so we add some more here. -bleach.sanitizer.ALLOWED_TAGS += [ 'br', 'img', 'p', 'pre', 'h1', 'h2', 'h3' ] +bleach.sanitizer.ALLOWED_TAGS += [ 'br', 'img', 'p', 'pre', 'h1', 'h2', 'h3', 'hr' ] bleach.sanitizer.ALLOWED_ATTRIBUTES.update ({ 'img': [ 'src' ] })