From 6fe7cc4c580e7e54b0d04c9e98b5ae5218c25bb6 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..e0246169 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] <= 32) + continue; + switch (u[i]) { case '"': tmp->append("""); break; -- 2.13.2