feat: add escapeHtml util
This commit is contained in:
parent
e7e7bfc395
commit
a323bd3aa3
3
packages/react/src/utils/escapeHtml.ts
Normal file
3
packages/react/src/utils/escapeHtml.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export const escapeHtml = (unsafe: string) => {
|
||||||
|
return unsafe.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user