use escapehtml for title
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
|
import escapeHTML from 'escape-html'
|
||||||
import {type Hole, html} from 'uhtml'
|
import {type Hole, html} from 'uhtml'
|
||||||
|
|
||||||
export function linkRedirectContents(link: string): Hole {
|
export function linkRedirectContents(link: string): Hole {
|
||||||
return html`
|
return html`
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="refresh" content="0; URL='${link}'" />
|
<meta http-equiv="refresh" content="0; URL='${escapeHTML(link)}'" />
|
||||||
<meta
|
<meta
|
||||||
http-equiv="Cache-Control"
|
http-equiv="Cache-Control"
|
||||||
content="no-store, no-cache, must-revalidate, max-age=0" />
|
content="no-store, no-cache, must-revalidate, max-age=0" />
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import escapeHTML from 'escape-html'
|
||||||
import {type Hole, html} from 'uhtml'
|
import {type Hole, html} from 'uhtml'
|
||||||
|
|
||||||
export function linkWarningContents(opts: {
|
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.'}
|
: 'This link has been identified as malicious and has blocked for your safety.'}
|
||||||
</p>
|
</p>
|
||||||
<div class="blocked-site">
|
<div class="blocked-site">
|
||||||
<p class="site-url">${opts.link}</p>
|
<p class="site-url">${escapeHTML(opts.link)}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
${opts.type === 'warn'
|
${opts.type === 'warn'
|
||||||
? html`<a class="button secondary" href="${opts.link}"
|
? html`<a class="button secondary" href="${escapeHTML(opts.link)}"
|
||||||
>Continue Anyway</a
|
>Continue Anyway</a
|
||||||
>`
|
>`
|
||||||
: null}
|
: null}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import escapeHTML from 'escape-html'
|
||||||
import {type Hole, html} from 'uhtml'
|
import {type Hole, html} from 'uhtml'
|
||||||
|
|
||||||
export function linkWarningLayout(
|
export function linkWarningLayout(
|
||||||
@@ -15,7 +16,7 @@ export function linkWarningLayout(
|
|||||||
<meta http-equiv="Pragma" content="no-cache" />
|
<meta http-equiv="Pragma" content="no-cache" />
|
||||||
<meta http-equiv="Expires" content="0" />
|
<meta http-equiv="Expires" content="0" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>${title}</title>
|
<title>${escapeHTML(title)}</title>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user