mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user