From 1635580c736ea2cbd4596fd02dd7957b870f1a07 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Mon, 30 Apr 2018 17:42:43 +0100 Subject: [PATCH] Escape backslashes before all else --- cpdf.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpdf.ml b/cpdf.ml index 62db932..1585c5a 100644 --- a/cpdf.ml +++ b/cpdf.ml @@ -1225,7 +1225,7 @@ let list_bookmarks encoding range pdf output = and nl = int_of_char '\n' and n = int_of_char 'n' and q = int_of_char '\"' in - replace bs bs bs (replace nl bs n (replace q bs q codepoints)) + replace q bs q (replace nl bs n (replace bs bs bs codepoints)) in match encoding with | UTF8 -> Pdftext.utf8_of_codepoints escaped