diff --git a/packages/react/src/utils/escapeHtml.ts b/packages/react/src/utils/escapeHtml.ts new file mode 100644 index 0000000..953ed66 --- /dev/null +++ b/packages/react/src/utils/escapeHtml.ts @@ -0,0 +1,3 @@ +export const escapeHtml = (unsafe: string) => { + return unsafe.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", '''); +}