mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-11 14:45:59 +08:00
Disable eval for pdfjs [SCI-10680]
This commit is contained in:
parent
81e3f16d14
commit
a1bb160c70
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ var PdfPreview = (function() {
|
||||||
|
|
||||||
|
|
||||||
function loadPdfDocument(canvas, page = 1) {
|
function loadPdfDocument(canvas, page = 1) {
|
||||||
var loadingPdf = pdfjsLib.getDocument(canvas.dataset.pdfUrl);
|
var loadingPdf = pdfjsLib.getDocument({ url: canvas.dataset.pdfUrl, isEvalSupported: false });
|
||||||
$(canvas).data('load-attempts', $(canvas).data('load-attempts') + 1);
|
$(canvas).data('load-attempts', $(canvas).data('load-attempts') + 1);
|
||||||
loadingPdf.promise
|
loadingPdf.promise
|
||||||
.then(function(pdfDocument) {
|
.then(function(pdfDocument) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue