Add single quote escaping just in case

This commit is contained in:
dangered wolf 2022-07-15 01:11:10 -04:00
parent d889ee9d16
commit a4d5dda635
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -1,3 +1,3 @@
export const sanitizeText = (text: string) => {
return text.replace(/\"/g, '&#34;').replace(/\</g, '&lt;').replace(/\>/g, '&gt;');
return text.replace(/\"/g, '&#34;').replace(/\'/g, '&#39;').replace(/\</g, '&lt;').replace(/\>/g, '&gt;');
};