diff --git a/tildes/tests/test_markdown.py b/tildes/tests/test_markdown.py
index 3e18196..462490f 100644
--- a/tildes/tests/test_markdown.py
+++ b/tildes/tests/test_markdown.py
@@ -148,6 +148,14 @@ def test_https_link_linkified():
assert '' in processed
+def test_mailto_link_linkified():
+ """Ensure that writing an email results in a working mailto link."""
+ markdown = "My email is email@example.com."
+ processed = convert_markdown_to_safe_html(markdown)
+
+ assert '' in processed
+
+
def test_link_with_path_linkified():
"""Ensure a link with a path results in a link."""
markdown = "So http://example.com/a/b_c_d/e too?"
diff --git a/tildes/tildes/lib/markdown.py b/tildes/tildes/lib/markdown.py
index 9bb9476..d9cce60 100644
--- a/tildes/tildes/lib/markdown.py
+++ b/tildes/tildes/lib/markdown.py
@@ -95,7 +95,7 @@ HTML_ATTRIBUTE_WHITELIST = {
"code": allow_syntax_highlighting_classes,
"span": allow_syntax_highlighting_classes,
}
-PROTOCOL_WHITELIST = ("http", "https")
+PROTOCOL_WHITELIST = ("http", "https", "mailto")
# Regex that finds ordered list markdown that was probably accidental - ones being
# initiated by anything except "1." at the start of a post