diff --git a/bskylink/src/html/linkRedirectContents.ts b/bskylink/src/html/linkRedirectContents.ts index a3d31de50e..f387963ea4 100644 --- a/bskylink/src/html/linkRedirectContents.ts +++ b/bskylink/src/html/linkRedirectContents.ts @@ -1,10 +1,11 @@ +import escapeHTML from 'escape-html' import {type Hole, html} from 'uhtml' export function linkRedirectContents(link: string): Hole { return html` - + diff --git a/bskylink/src/html/linkWarningContents.ts b/bskylink/src/html/linkWarningContents.ts index 70b91ea23a..d55f085870 100644 --- a/bskylink/src/html/linkWarningContents.ts +++ b/bskylink/src/html/linkWarningContents.ts @@ -1,3 +1,4 @@ +import escapeHTML from 'escape-html' import {type Hole, html} from 'uhtml' export function linkWarningContents(opts: { @@ -15,11 +16,11 @@ export function linkWarningContents(opts: { : 'This link has been identified as malicious and has blocked for your safety.'}

-

${opts.link}

+

${escapeHTML(opts.link)}

${opts.type === 'warn' - ? html`Continue Anyway` : null} diff --git a/bskylink/src/html/linkWarningLayout.ts b/bskylink/src/html/linkWarningLayout.ts index cc5c4d4ac9..be4e10a9d6 100644 --- a/bskylink/src/html/linkWarningLayout.ts +++ b/bskylink/src/html/linkWarningLayout.ts @@ -1,3 +1,4 @@ +import escapeHTML from 'escape-html' import {type Hole, html} from 'uhtml' export function linkWarningLayout( @@ -15,7 +16,7 @@ export function linkWarningLayout( - ${title} + ${escapeHTML(title)}