condence HTML
This commit is contained in:
parent
69de205064
commit
81dd5516b5
2 changed files with 38 additions and 11 deletions
21
index.js
21
index.js
|
@ -77,17 +77,16 @@ async function inviteres(req,res){
|
|||
function strEscape(s){
|
||||
return JSON.stringify(s);
|
||||
}
|
||||
html=`
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>${htmlEnc(title)}</title>
|
||||
<meta content=${strEscape(title)} property="og:title" />
|
||||
<meta content=${strEscape(description)} property="og:description" />
|
||||
<meta content=${strEscape(icon)} property="og:image" />
|
||||
</head>
|
||||
</html>
|
||||
`
|
||||
html=
|
||||
`<!DOCTYPE html>`+
|
||||
`<html lang="en">`+
|
||||
`<head>`+
|
||||
`<title>${htmlEnc(title)}</title>`+
|
||||
`<meta content=${strEscape(title)} property="og:title"/>`+
|
||||
`<meta content=${strEscape(description)} property="og:description"/>`+
|
||||
`<meta content=${strEscape(icon)} property="og:image"/>`+
|
||||
`</head>`+
|
||||
`</html>`
|
||||
res.type('html');
|
||||
res.send(html);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue