@@ -40,7 +40,7 @@ import Text.Pandoc.Slides
40import Text.Pandoc.Highlighting ( highlight, styleToCss,
40import Text.Pandoc.Highlighting ( highlight, styleToCss,
41 formatHtmlInline, formatHtmlBlock )
41 formatHtmlInline, formatHtmlBlock )
42import Text.Pandoc.XML (fromEntities, escapeStringForXML)
42import Text.Pandoc.XML (fromEntities, escapeStringForXML)
43−import Network.URI ( parseURIReference, URI(..) )
43+import Network.URI ( parseURIReference, URI(..), unEscapeString )
44import Network.HTTP ( urlEncode )
44import Network.HTTP ( urlEncode )
45import Numeric ( showHex )
45import Numeric ( showHex )
46import Data.Char ( ord, toLower )
46import Data.Char ( ord, toLower )
@@ -361,13 +361,13 @@ obfuscateLink opts txt s =
361 ReferenceObfuscation ->
361 ReferenceObfuscation ->
362 -- need to use preEscapedString or &'s are escaped to & in URL
362 -- need to use preEscapedString or &'s are escaped to & in URL
363 preEscapedString $ "<a href=\"" ++ (obfuscateString s')
363 preEscapedString $ "<a href=\"" ++ (obfuscateString s')
364− ++ "\">" ++ (obfuscateString txt) ++ "</a>"
364+ ++ "\" class=\"email\">" ++ (obfuscateString txt) ++ "</a>"
365 JavascriptObfuscation ->
365 JavascriptObfuscation ->
366 (H.script ! A.type_ "text/javascript" $
366 (H.script ! A.type_ "text/javascript" $
367 preEscapedString ("\n<!--\nh='" ++
367 preEscapedString ("\n<!--\nh='" ++
368 obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++
368 obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++
369 obfuscateString name' ++ "';e=n+a+h;\n" ++
369 obfuscateString name' ++ "';e=n+a+h;\n" ++
370− "document.write('<a h'+'ref'+'=\"ma'+'ilto'+':'+e+'\">'+" ++
370+ "document.write('<a h'+'ref'+'=\"ma'+'ilto'+':'+e+'\" clas'+'s=\"em' + 'ail\">'+" ++
371 linkText ++ "+'<\\/'+'a'+'>');\n// -->\n")) >>
371 linkText ++ "+'<\\/'+'a'+'>');\n// -->\n")) >>
372 H.noscript (preEscapedString $ obfuscateString altText)
372 H.noscript (preEscapedString $ obfuscateString altText)
373 _ -> error $ "Unknown obfuscation method: " ++ show meth
373 _ -> error $ "Unknown obfuscation method: " ++ show meth
@@ -739,9 +739,12 @@ inlineToHtml opts inline =
739 RevealJsSlides -> '#':'/':xs
739 RevealJsSlides -> '#':'/':xs
741 let link = H.a ! A.href (toValue s') $ linkText
741 let link = H.a ! A.href (toValue s') $ linkText
742+ let link' = if txt == [Str (unEscapeString s)]
743+ then link ! A.class_ "uri"
742 return $ if null tit
745 return $ if null tit
743− then link
746+ then link'
744− else link ! A.title (toValue tit)
747+ else link' ! A.title (toValue tit)
745 (Image txt (s,tit)) | treatAsImage s -> do
748 (Image txt (s,tit)) | treatAsImage s -> do
746 let alternate' = stringify txt
749 let alternate' = stringify txt
747 let attributes = [A.src $ toValue s] ++
750 let attributes = [A.src $ toValue s] ++