Update app.js

This commit is contained in:
Aditya kumar singh 2025-09-16 00:33:42 +05:30
parent e751fd0f68
commit 244c528883

View File

@ -778,7 +778,7 @@ const PDFViewerApplication = {
const params = parseQueryString(queryString); const params = parseQueryString(queryString);
file = params.get("file") ?? AppOptions.get("defaultUrl"); file = params.get("file") ?? AppOptions.get("defaultUrl");
try { try {
file = new URL(decodeURIComponent(file)).href; file = new URL(file).href;
} catch { } catch {
file = encodeURIComponent(file).replaceAll("%2F", "/"); file = encodeURIComponent(file).replaceAll("%2F", "/");
} }