summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Util.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX/Util.hs b/src/Text/Pandoc/Writers/LaTeX/Util.hs
index f19f5ddd5..79937e1fa 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Util.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Util.hs
@@ -94,9 +94,12 @@ stringToLaTeX context zs = do
in case x of
'\\'| isUrl -> emitc '/' -- NB. / works as path sep even on Windows
'#' | isUrl -> emits "\\#" -- see #9014
+ '%' | isUrl -> emits "\\%" -- see #9014
c | isUrl ->
if c `elem` ['{', '}', '|', '^', '~', '[', ']', '`']
- then emits (escapeURIString (const False) [c])
+ then do
+ emitc '\\' -- escape the % see #9014
+ emits (escapeURIString (const False) [c])
else emitc c
'{' -> emits "\\{"
'}' -> emits "\\}"