mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 05:25:00 +02:00
11 lines
323 B
TypeScript
11 lines
323 B
TypeScript
export const escape = (str: string): string => {
|
|
try {
|
|
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
|
} catch (ee: any) {
|
|
console.error(ee)
|
|
}
|
|
return str
|
|
}
|
|
|
|
export const unescape = (str: string): string => str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|