4b2412c49c
* Copy in og-image code * Add "yarn start" command in lieu of vercel * Don't require that images be sourced from vercel * Load in Major Mono and Readex fonts * Fix vercel config (?) * Replace default image with Manifold's * Add some brief instructions on getting started * In the UI, use the default image * Fix typescript errors * More typescript fixing
13 lines
264 B
TypeScript
13 lines
264 B
TypeScript
const entityMap: { [key: string]: string } = {
|
|
"&": "&",
|
|
"<": "<",
|
|
">": ">",
|
|
'"': """,
|
|
"'": "'",
|
|
"/": "/",
|
|
};
|
|
|
|
export function sanitizeHtml(html: string) {
|
|
return String(html).replace(/[&<>"'\/]/g, (key) => entityMap[key]);
|
|
}
|