notify: escapeHtml for titles
This commit is contained in:
parent
f8932af2a1
commit
72a61458fc
4 changed files with 12 additions and 11 deletions
4
util.js
4
util.js
|
|
@ -95,3 +95,7 @@ export const notify = (html) => {
|
|||
if (stdout) console.log(`stdout: ${stdout}`);
|
||||
});
|
||||
}
|
||||
|
||||
export const escapeHtml = (unsafe) => unsafe.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
||||
|
||||
export const html_game_list = games => games.map(g => `- <a href="${g.url}">${escapeHtml(g.title)}</a> (${g.status})`).join('<br>');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue