Fixed bug in HTML email obfuscation using --strict mode.
The problem is that the "href" function escapes &, so (href "l") is 'href="l"'. Fixed by using primHtml for the whole link. Resolves issue 9. git-svn-id: https://pandoc.googlecode.com/svn/trunk@569 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
115cad8882
commit
2e794fdf37
1 changed files with 3 additions and 1 deletions
|
@ -106,7 +106,9 @@ obfuscateLink opts txt src =
|
|||
else text' ++ " (" ++ name ++ " at " ++
|
||||
domain' ++ ")" in
|
||||
if writerStrictMarkdown opts
|
||||
then anchor ! [href $ obfuscateString src'] << obfuscateString text'
|
||||
then -- need to use primHtml or &'s are escaped to & in URL
|
||||
primHtml $ "<a href=\"" ++ (obfuscateString src')
|
||||
++ "\">" ++ (obfuscateString text') ++ "</a>"
|
||||
else (script ! [thetype "text/javascript"] $
|
||||
primHtml ("\n<!--\nh='" ++
|
||||
obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++
|
||||
|
|
Loading…
Add table
Reference in a new issue