0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 07:12:39 +00:00

Escape to HTML entities

This commit is contained in:
Trevor Buckner
2025-01-28 00:24:15 -05:00
parent ecd8869097
commit 6a31d612e6

View File

@@ -5,7 +5,7 @@ const loginUrl = 'https://www.naturalcrit.com/login';
// Prevent parsing text (e.g. document titles) as markdown
const escape = (text) => {
return text.split('').map(char => `\\${char}`).join('');
return text.split('').map(char => `&#${char.charCodeAt(0)};`).join('');
};
//001-050 : Brew errors