mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
make scramitize checks as strict as wrapfn
This commit is contained in:
parent
4b955d3dcb
commit
2978b4a12e
6 changed files with 244 additions and 233 deletions
|
@ -27,9 +27,7 @@ export function unrewriteBlob(url: string) {
|
|||
}
|
||||
|
||||
export function rewriteUrl(url: string | URL, meta: URLMeta) {
|
||||
if (url instanceof URL) {
|
||||
url = url.toString();
|
||||
}
|
||||
if (url instanceof URL) url = url.toString();
|
||||
|
||||
if (url.startsWith("javascript:")) {
|
||||
return (
|
||||
|
@ -58,9 +56,7 @@ export function rewriteUrl(url: string | URL, meta: URLMeta) {
|
|||
}
|
||||
|
||||
export function unrewriteUrl(url: string | URL) {
|
||||
if (url instanceof URL) {
|
||||
url = url.toString();
|
||||
}
|
||||
if (url instanceof URL) url = url.toString();
|
||||
|
||||
const prefixed = location.origin + $scramjet.config.prefix;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue