From 8824fa7bc42c89abb17cbed47c976cc3fbfb5a35 Mon Sep 17 00:00:00 2001 From: Jason Crain Date: Sun, 16 Jul 2017 12:07:54 -0500 Subject: [PATCH] pdftohtml: skip control characters W3C disallows them and they cause a warning in PHP. https://bugs.freedesktop.org/show_bug.cgi?id=101770 --- utils/HtmlFonts.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc index 49376d65..c9590e18 100644 --- a/utils/HtmlFonts.cc +++ b/utils/HtmlFonts.cc @@ -252,6 +252,11 @@ GooString* HtmlFont::HtmlFilter(Unicode* u, int uLen) { } for (int i = 0; i < uLen; ++i) { + // skip control characters. W3C disallows them and they cause a warning + // with PHP. + if (u[i] <= 31) + continue; + switch (u[i]) { case '"': tmp->append("""); break; -- 2.13.2