mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
fix: avoid DOM Clobbering gadget in getRelativeUrlFromDocument
(#18115)
This commit is contained in:
parent
8339d74086
commit
ebb94c5b3b
@ -1131,7 +1131,7 @@ const getRelativeUrlFromDocument = (relativePath: string, umd = false) =>
|
||||
getResolveUrl(
|
||||
`'${escapeId(partialEncodeURIPath(relativePath))}', ${
|
||||
umd ? `typeof document === 'undefined' ? location.href : ` : ''
|
||||
}document.currentScript && document.currentScript.src || document.baseURI`,
|
||||
}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,
|
||||
)
|
||||
|
||||
const getFileUrlFromFullPath = (path: string) =>
|
||||
|
Loading…
Reference in New Issue
Block a user