From 0a4a6253a3f1d4e53c5d4fefd581aa945816ff05 Mon Sep 17 00:00:00 2001 From: Jakub Wilk Date: Mon, 16 Jan 2017 12:44:35 +0100 Subject: [PATCH] dumppdf: simplify regexp The quote character was included twice in the character set: once literally, and once as \042. --- tools/dumppdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dumppdf.py b/tools/dumppdf.py index 29a11449..dd9c7736 100755 --- a/tools/dumppdf.py +++ b/tools/dumppdf.py @@ -16,7 +16,7 @@ from pdfminer.utils import isnumber -ESC_PAT = re.compile(r'[\000-\037&<>()"\042\047\134\177-\377]') +ESC_PAT = re.compile(r'[\000-\037&<>()"\047\134\177-\377]') def e(s): return ESC_PAT.sub(lambda m:'&#%d;' % ord(m.group(0)), s)