single-file-core 1.0.38 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
File without changes
package/LICENSE CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/modules/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
File without changes
File without changes
File without changes
File without changes
@@ -502,7 +502,7 @@ class Processor {
502
502
  if (this.options.insertMetaCSP) {
503
503
  const metaTag = this.doc.createElement("meta");
504
504
  metaTag.httpEquiv = "content-security-policy";
505
- metaTag.content = "default-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'unsafe-inline'; media-src 'self' data:; script-src 'unsafe-inline' data:; object-src 'self' data:;";
505
+ metaTag.content = "default-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'unsafe-inline'; media-src 'self' data:; script-src 'unsafe-inline' data:; object-src 'self' data:; frame-src 'self' data:;";
506
506
  this.doc.head.appendChild(metaTag);
507
507
  }
508
508
  if (this.options.insertMetaNoIndex) {
@@ -764,7 +764,7 @@ class Processor {
764
764
  placeholderElement.replaceWith(noscriptElement);
765
765
  });
766
766
  this.doc.querySelectorAll("meta[http-equiv=\"content-security-policy\"]").forEach(element => element.remove());
767
- const objectElements = this.doc.querySelectorAll("applet, object[data]:not([type=\"image/svg+xml\"]):not([type=\"image/svg-xml\"]):not([type=\"text/html\"]), embed[src]:not([src*=\".svg\"]):not([src*=\".pdf\"])");
767
+ const objectElements = this.doc.querySelectorAll("applet, object[data]:not([type=\"image/svg+xml\"]):not([type=\"image/svg-xml\"]):not([type=\"text/html\"]):not([data*=\".svg\"]):not([data*=\".pdf\"]), embed[src]:not([src*=\".svg\"]):not([src*=\".pdf\"])");
768
768
  this.stats.set("discarded", "objects", objectElements.length);
769
769
  this.stats.set("processed", "objects", objectElements.length);
770
770
  objectElements.forEach(element => element.remove());
@@ -1222,7 +1222,7 @@ class Processor {
1222
1222
  async processPageResources() {
1223
1223
  const processAttributeArgs = [
1224
1224
  ["link[href][rel*=\"icon\"]", "href", false, true],
1225
- ["object[type=\"image/svg+xml\"], object[type=\"image/svg-xml\"]", "data"],
1225
+ ["object[type=\"image/svg+xml\"], object[type=\"image/svg-xml\"], object[data*=\".svg\"], object[data*=\".pdf\"]", "data"],
1226
1226
  ["img[src], input[src][type=image]", "src", true],
1227
1227
  ["embed[src*=\".svg\"], embed[src*=\".pdf\"]", "src"],
1228
1228
  ["video[poster]", "poster"],
File without changes
File without changes
File without changes
File without changes
File without changes
package/single-file.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/vendor/index.js CHANGED
File without changes
File without changes