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 deletion
—
download
Diffstat
Diff options
+1/-1
M freepost/__init__.py
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
|
|
})
|