Vanessa 2023-09-03 11:22:54 +08:00
parent 06512f994b
commit 2984cb7488
3 changed files with 16 additions and 11 deletions

View file

@ -9,3 +9,8 @@ export const escapeGreat = (html: string) => {
export const escapeAttr = (html: string) => {
return html.replace(/"/g, """).replace(/'/g, "'");
};
export const escapeAriaLabel = (html: string) => {
return html.replace(/"/g, """).replace(/'/g, "'")
.replace(/</g, "&amp;lt;");
};