1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Handle PI with no value in xml parser

- an XML PI contains a target and optionally some content (see https://en.wikipedia.org/wiki/Processing_Instruction)
  - the parser expected to always have some content and so it could lead to wrong parsing.
This commit is contained in:
Calixte Denizet 2021-05-18 10:22:12 +02:00
parent 17e9cfcd2a
commit 4544ebf38a
2 changed files with 26 additions and 1 deletions

View file

@ -145,6 +145,7 @@ class XMLParserBase {
pos < s.length &&
!isWhitespace(s, pos) &&
s[pos] !== ">" &&
s[pos] !== "?" &&
s[pos] !== "/"
) {
++pos;