Fix #881 -- Allow tel: links in markdown (#882)

Closes #881
This commit is contained in:
Tobias Kunze
2018-04-24 16:22:53 +02:00
committed by Raphael Michel
parent 093eb28463
commit 6df0597c5e

View File

@@ -58,6 +58,8 @@ ALLOWED_ATTRIBUTES = {
# Update doc/user/markdown.rst if you change this!
}
ALLOWED_PROTOCOLS = ['http', 'https', 'mailto', 'tel']
def safelink_callback(attrs, new=False):
url = attrs.get((None, 'href'), '/')
@@ -86,7 +88,8 @@ def markdown_compile(source):
]
),
tags=ALLOWED_TAGS,
attributes=ALLOWED_ATTRIBUTES
attributes=ALLOWED_ATTRIBUTES,
protocols=ALLOWED_PROTOCOLS,
)