mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
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