update @ Sat 9 Oct 04:59:39 EEST 2021

This commit is contained in:
Ari Archer 2021-10-09 04:59:39 +03:00
parent dfc2c0eb45
commit de965ba6e6
2 changed files with 19 additions and 8 deletions

View file

@ -54,4 +54,15 @@ const locations = {
]
}
}
const escape_HTML = str =>
str.replace(
/[&<>'"]/g,
tag =>
({
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
"'": '&#39;',
'"': '&quot;'
}[tag] || tag)
);

View file

@ -168,5 +168,5 @@ function whoami() {
function echo(argv) {
return argv.join(" ");
return escape_HTML(argv.join(" "));
}