home » zplus/freepost.git
Author zPlus <zplus@peers.community> 2019-02-08 19:35:54
Committer zPlus <zplus@peers.community> 2019-02-08 19:35:54
Commit 63f6d10 (patch)
Tree 6c300eb
Parent(s)

Fix #82 Whitelist <h1> tags in markdown->html conversion.


commits diff: a0a9e51..63f6d10
1 file changed, 1 insertion, 1 deletiondownload


Diffstat
-rwxr-xr-x freepost/__init__.py 2

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+1/-1 M   freepost/__init__.py
index aef0098..ba8b3ff
old size: 27K - new size: 27K
@@ -64,7 +64,7 @@ template = functools.partial (
64 64 # "bleach" library is used to sanitize the HTML output of jinja2's "md2html"
65 65 # filter. The library has only a very restrictive list of white-listed
66 66 # tags, so we add some more here.
67 - bleach.sanitizer.ALLOWED_TAGS += [ 'br', 'img', 'p', 'pre' ]
67 + bleach.sanitizer.ALLOWED_TAGS += [ 'br', 'img', 'p', 'pre', 'h1', 'h2', 'h3' ]
68 68 bleach.sanitizer.ALLOWED_ATTRIBUTES.update ({
69 69 'img': [ 'src' ]
70 70 })