-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Problem is with getAbsoluteLocalPath
which turns spaces in pathname into %20
react-pdf/packages/image/src/resolve.ts
Lines 34 to 55 in ee5c96b
const getAbsoluteLocalPath = (src: string) => { | |
if (BROWSER) { | |
throw new Error('Cannot check local paths in client-side environment'); | |
} | |
const { | |
protocol, | |
auth, | |
host, | |
port, | |
hostname, | |
path: pathname, | |
} = url.parse(src); | |
const absolutePath = pathname ? path.resolve(pathname) : undefined; | |
if ((protocol && protocol !== 'file:') || auth || host || port || hostname) { | |
return undefined; | |
} | |
return absolutePath; | |
}; |
Metadata
Metadata
Assignees
Labels
No labels