there. have your unicode. are you happy

This commit is contained in:
ewwwin 2025-05-08 23:38:06 -07:00 committed by GitHub
parent db9f6a1784
commit 7ced703053
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ createServer(async (request, response) => {
response.writeHead(200, { response.writeHead(200, {
'content-type': 'text/html', 'content-type': 'text/html',
}).end( }).end(
`<meta name=viewport content="width=device-width,initial-scale=1"><pre style="white-space:pre-wrap;text-indent:4ch hanging each-line">${ `<meta charset="utf-8"><meta name=viewport content="width=device-width,initial-scale=1"><pre style="white-space:pre-wrap;text-indent:4ch hanging each-line">${
(await readFile('a.txt', {flag: 'a+', encoding: 'utf8'})) (await readFile('a.txt', {flag: 'a+', encoding: 'utf8'}))
// ugh, fine, i'll html escape it. no xss for you // ugh, fine, i'll html escape it. no xss for you
.replace(/[<>&'"]/g, match => ({ .replace(/[<>&'"]/g, match => ({