@@ -171,12 +171,8 @@ elementToLaTeX opts (Sec level _ id' title' elements) = do
171171-- escape things as needed for LaTeX
172172stringToLaTeX :: Bool -> String -> String
173173stringToLaTeX isUrl = escapeStringUsing latexEscapes
174− where latexEscapes = backslashEscapes "{}$%&_" ++
175− if isUrl
176− then []
177− else [ ('~', "\\ensuremath{\\sim}")
178− , ('#', "\\#")
179− ] ++
174+ where latexEscapes = backslashEscapes "{}$%&_#" ++
175+ [ ('~', "\\ensuremath{\\sim}") | not isUrl ] ++
180176 [ ('^', "\\^{}")
181177 , ('\\', "\\textbackslash{}")
182178 , ('€', "\\euro{}")