summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2023-06-16 18:52:59 -0400
committerJohn MacFarlane <jgm@berkeley.edu>2023-06-16 18:52:59 -0400
commit913bd8c7771d0be513307a94263483d3e8faec2d (patch)
treed7227e7caac48e426414def85b14a6bbc6b24ba6
parentb1a78b0ddaca165374f2e5bfe3fa408a529d43bb (diff)
LaTeX writer: Fix escaping of `&` in `\href` and `\url`.
Closes #8903.
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Util.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX/Util.hs b/src/Text/Pandoc/Writers/LaTeX/Util.hs
index 175d0d2e8..118709568 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Util.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Util.hs
@@ -104,7 +104,7 @@ stringToLaTeX context zs = do
'`' | ctx == CodeString -> emitcseq "\\textasciigrave"
'$' | not isUrl -> emits "\\$"
'%' -> emits "\\%"
- '&' -> emits "\\&"
+ '&' | not isUrl -> emits "\\&"
'_' | not isUrl -> emits "\\_"
'#' -> emits "\\#"
'-' | not isUrl -> case xs of