forked from abner/for-legacy-web
Explicitly deny bad URLs.
Fixes #252. Handle embed untrusted links better.
This commit is contained in:
@@ -52,7 +52,9 @@ export function determineLink(href?: string): LinkType {
|
||||
} catch (err) {}
|
||||
|
||||
if (!internal && url) {
|
||||
return { type: "external", href, url };
|
||||
if (url.protocol !== "javascript") {
|
||||
return { type: "external", href, url };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user