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) {
3093
3093
Object . prototype . toString . call ( globalObject ) === "[object Window]"
3094
3094
) {
3095
3095
var pdfObjectUrl =
3096
- options . pdfObjectUrl ||
3097
3096
"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
+
3098
3105
var htmlForNewWindow =
3099
3106
"<html>" +
3100
3107
'<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="' +
3101
3108
pdfObjectUrl +
3102
- '"></script><script >PDFObject.embed("' +
3109
+ '"' +
3110
+ integrity +
3111
+ '></script><script >PDFObject.embed("' +
3103
3112
this . output ( "dataurlstring" ) +
3104
3113
'", ' +
3105
3114
JSON . stringify ( options ) +
You can’t perform that action at this time.
0 commit comments