mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-27 05:46:22 +00:00
9 lines
216 B
TypeScript
9 lines
216 B
TypeScript
|
export const escapeHTML = (unsafe: string) => {
|
||
|
return unsafe
|
||
|
.replaceAll("&", "&")
|
||
|
.replaceAll("<", "<")
|
||
|
.replaceAll(">", ">")
|
||
|
.replaceAll('"', """)
|
||
|
.replaceAll("'", "'")
|
||
|
}
|