0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 14:22:52 +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 // Prevent parsing text (e.g. document titles) as markdown
const escape = (text) => { const escape = (text) => {
return text.split('').map(char => `\\${char}`).join(''); return text.split('').map(char => `&#${char.charCodeAt(0)};`).join('');
}; };
//001-050 : Brew errors //001-050 : Brew errors