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

[JS] Embedded JS scripts can have some null chars

This commit is contained in:
Calixte Denizet 2022-07-15 14:59:29 +02:00
parent 3256761ead
commit 5f0c95e70e
2 changed files with 3 additions and 2 deletions

View file

@ -339,7 +339,7 @@ function _collectJS(entry, xref, list, parents) {
} else if (typeof js === "string") {
code = js;
}
code = code && stringToPDFString(code);
code = code && stringToPDFString(code).replace(/\u0000/g, "");
if (code) {
list.push(code);
}