diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-04-08 21:04:47 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-04-08 21:04:47 +0000 |
commit | 74e74972260eae3baa69ec254c83c2aaad314e70 (patch) | |
tree | c291d992e8fc8264b8ce73a630107826fcdaf0bb /src/Text/Pandoc | |
parent | 571c3b41737f3a331706833adeb8241d93cef10c (diff) | |
download | pandoc-74e74972260eae3baa69ec254c83c2aaad314e70.tar.gz |
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
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |