Pages list and Tiptap editor (ported from babyboo) with image upload on save, the FORM event picker, field errors at their fields, delete confirmation, unsaved-edits guard and a draft preview. The public page /p/<company>/<slug> renders on the server with metadata, sanitize-html, the company's logo and accent, and the sign-up form with UTM tags. Companies get branding; the event lead detail shows the web page and campaign. Labels in English and Chinese. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
8 lines
465 B
TypeScript
8 lines
465 B
TypeScript
import { sanitizePageHtml } from "@/app/lib/pageHtml";
|
|
|
|
// The only place a landing page renders HTML: page authors' rich text, sanitised with the allow-list in pageHtml.ts.
|
|
// Deliberately free of i18n imports (noDangerouslySetInnerHtml sweep: catalog text is never markup).
|
|
export function SafeHtml({ html, className }: { html: string; className?: string }) {
|
|
return <div className={className} dangerouslySetInnerHTML={{ __html: sanitizePageHtml(html) }} />;
|
|
}
|