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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user