From 74e74972260eae3baa69ec254c83c2aaad314e70 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 8 Apr 2007 21:04:47 +0000 Subject: Fixed bug in email obfuscation (issue #15). If the text to be obfuscated contains an entity, this needs to be decoded before obfuscation. Thanks to thsutton for the patch. git-svn-id: https://pandoc.googlecode.com/svn/trunk@579 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/HTML.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 6b42c010f..be5eb8506 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -30,6 +30,7 @@ Conversion of 'Pandoc' documents to HTML. module Text.Pandoc.Writers.HTML ( writeHtml, writeHtmlString ) where import Text.Pandoc.Definition import Text.Pandoc.Shared +import Text.Pandoc.Entities (decodeEntities) import Text.Regex ( mkRegex, matchRegex ) import Numeric ( showHex ) import Data.Char ( ord, toLower ) @@ -127,7 +128,7 @@ obfuscateChar char = -- | Obfuscate string using entities. obfuscateString :: String -> String -obfuscateString = concatMap obfuscateChar +obfuscateString = (concatMap obfuscateChar) . decodeEntities -- | Convert Pandoc block element to HTML. blockToHtml :: WriterOptions -> Block -> Html -- cgit v1.2.3