git.iko.soy/typeable/pandoc
on master help sign in
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

commit74e74972260eae3baa69ec254c83c2aaad314e70 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 8 Apr 2007, 21:04 (20 years ago) parent571c3b4
1 file changed+2−1
src/Text/Pandoc/Writers/HTML.hs+2−1
src/Text/Pandoc/Writers/HTML.hs+2−1
@@ -30,6 +30,7 @@ Conversion of 'Pandoc' documents to HTML.
3030module Text.Pandoc.Writers.HTML ( writeHtml, writeHtmlString ) where
3131import Text.Pandoc.Definition
3232import Text.Pandoc.Shared
33+import Text.Pandoc.Entities (decodeEntities)
3334import Text.Regex ( mkRegex, matchRegex )
3435import Numeric ( showHex )
3536import Data.Char ( ord, toLower )
@@ -127,7 +128,7 @@ obfuscateChar char =
127128
128129-- | Obfuscate string using entities.
129130obfuscateString :: String -> String
130−obfuscateString = concatMap obfuscateChar
131+obfuscateString = (concatMap obfuscateChar) . decodeEntities
131132
132133-- | Convert Pandoc block element to HTML.
133134blockToHtml :: WriterOptions -> Block -> Html