Merge pull request #16297 from Snuffleupagus/copy-all-null-chars

Remove null chars, i.e. `\u0000`, when getting all text (PR 16286 follow-up)
This commit is contained in:
Jonas Jenwald 2023-04-16 12:45:16 +02:00 committed by GitHub
commit 5f7e43a2b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,7 @@ import {
MAX_SCALE,
MIN_SCALE,
PresentationModeState,
removeNullCharacters,
RenderingStates,
SCROLLBAR_PADDING,
scrollIntoView,
@ -671,7 +672,7 @@ class PDFViewer {
buffer.push("\n");
}
}
texts.push(buffer.join(""));
texts.push(removeNullCharacters(buffer.join("")));
}
return texts.join("\n");