summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 7fe77a69c..68a8a1e09 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -675,7 +675,9 @@ inlineToHtml opts inline =
_ -> return mempty
(RawInline "html" str) -> return $ preEscapedString str
(RawInline _ _) -> return mempty
- (Link [Code _ str] (s,_)) | "mailto:" `isPrefixOf` s ->
+ (Link [Str str] (s,_)) | "mailto:" `isPrefixOf` s &&
+ s == escapeURI ("mailto" ++ str) ->
+ -- autolink
return $ obfuscateLink opts str s
(Link txt (s,_)) | "mailto:" `isPrefixOf` s -> do
linkText <- inlineListToHtml opts txt