diff --git a/packages/fastify-html-plugin/examples/htmx.tsx b/examples/fastify-htmx.tsx similarity index 92% rename from packages/fastify-html-plugin/examples/htmx.tsx rename to examples/fastify-htmx.tsx index 9fa7b7737..4b0427f6a 100644 --- a/packages/fastify-html-plugin/examples/htmx.tsx +++ b/examples/fastify-htmx.tsx @@ -4,7 +4,7 @@ import fastifyFormbody from '@fastify/formbody'; import { Suspense } from '@kitajs/html/suspense'; import fastify from 'fastify'; import { setTimeout } from 'node:timers/promises'; -import { fastifyKitaHtml } from '..'; +import { fastifyKitaHtml } from '../packages/fastify-html-plugin/types'; const app = fastify({ logger: true }); @@ -84,6 +84,9 @@ app.post( (req, rep) => { const { username } = req.body as { username: string }; users.push(username); + + // Safe is required to avoid xss attacks. + // Use `xss-scan` CLI to automatically check for forgotten `safe` props. rep.html(