Skip to content

Commit 6265677

Browse files
committed
Security fix
1 parent eff3bdc commit 6265677

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jspdf.plugin.from_html.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
$hiddendiv = $("<div style=\"" + visuallyhidden + "\">" + "<iframe style=\"height:1px;width:1px\" name=\"" + framename + "\" />" + "</div>").appendTo(document.body);
310310
$frame = window.frames[framename];
311311
return $($frame.document.body).html(element)[0];
312-
})(element);
312+
})(element.replace(/<\/?script[^>]*?>/gi,''));
313313
}
314314
var r = new Renderer(pdf, x, y, settings);
315315
loadImgs.call(this, element, r, settings.elementHandlers, callback);

0 commit comments

Comments
 (0)