This is an MDX file, which means it can contain markdown.
The codeblock below is highlighted during build time with shiki, using my VSCode theme Karma and with the help of remark and rehype plugins.
This is a "normal" link
TS1const htmlEscapes = {2 "&": "&",3 "<": "<",4 ">": ">",5 // eslint-disable-next-line quotes6 '"': """,7 "'": "'",8} as const;910function escapeHtml(html: string) {11 return html.replace(12 /[&<>"']/g,13 (chr) => htmlEscapes[chr as keyof typeof htmlEscapes]14 );15}
Published: August 25, 2021UNPUBLISHED
No views yet. Wait what, How? 🤔