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

commit2e794fdf37dce8dd1ab5e385b5b3e38bef5f4364 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 11 Mar 2007, 00:19 (20 years ago) parent115cad8
1 file changed+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
@@ -106,7 +106,9 @@ obfuscateLink opts txt src =
106106 else text' ++ " (" ++ name ++ " at " ++
107107 domain' ++ ")" in
108108 if writerStrictMarkdown opts
109− then anchor ! [href $ obfuscateString src'] << obfuscateString text'
109+ then -- need to use primHtml or &'s are escaped to &amp; in URL
110+ primHtml $ "<a href=\"" ++ (obfuscateString src')
111+ ++ "\">" ++ (obfuscateString text') ++ "</a>"
110112 else (script ! [thetype "text/javascript"] $
111113 primHtml ("\n<!--\nh='" ++
112114 obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++