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