diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 10a2065c0fe62a..5723d6d39113c6 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -1812,6 +1812,14 @@ PDFJS.compatibilityChecked = true; case 'javascript': case 'mailto': return 'null'; + case 'blob': + // Special case of blob: -- returns valid origin of _schemaData. + try { + return new JURL(this._schemeData).origin || 'null'; + } catch (_) { + // Invalid _schemaData origin -- ignoring errors. + } + return 'null'; } host = this.host; if (!host) {