Vanessa 2023-12-23 23:50:04 +08:00
parent fb72af192e
commit 54ca2d6226
12 changed files with 112 additions and 65 deletions

View file

@ -1,4 +1,7 @@
export const escapeHtml = (html: string) => {
if (!html) {
return html;
}
return html.replace(/&/g, "&amp;").replace(/</g, "&lt;");
};