File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3093,13 +3093,22 @@ function jsPDF(options) {
30933093 Object . prototype . toString . call ( globalObject ) === "[object Window]"
30943094 ) {
30953095 var pdfObjectUrl =
3096- options . pdfObjectUrl ||
30973096 "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js" ;
3097+ var integrity =
3098+ ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"' ;
3099+
3100+ if ( options . pdfObjectUrl ) {
3101+ pdfObjectUrl = options . pdfObjectUrl ;
3102+ integrity = "" ;
3103+ }
3104+
30983105 var htmlForNewWindow =
30993106 "<html>" +
31003107 '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="' +
31013108 pdfObjectUrl +
3102- '"></script><script >PDFObject.embed("' +
3109+ '"' +
3110+ integrity +
3111+ '></script><script >PDFObject.embed("' +
31033112 this . output ( "dataurlstring" ) +
31043113 '", ' +
31053114 JSON . stringify ( options ) +
You can’t perform that action at this time.
0 commit comments