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
This commit is contained in:
fiddlosopher
2007-04-08 21:04:47 +00:00
parent 571c3b4173
commit 74e7497226
+2 -1
View File
@@ -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