data endpoint for entity 90008 (aka. a website)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: make sure users cant send too large of a content

+2 -1
+1 -1
src/routes/guestbook/+page.server.ts
··· 26 26 return async ({ request, cookies }: { request: Request, cookies: Cookies }) => { 27 27 const form = await request.formData() 28 28 const author = form.get("author")?.toString().replace(/([^_a-z0-9]+)/gi, '') 29 - const content = form.get("content")?.toString() 29 + const content = form.get("content")?.toString().substring(0, 512) 30 30 const scopedCookies = scopeCookies(cookies) 31 31 if (author === undefined || content === undefined) { 32 32 scopedCookies.set("sendError", "one of author or content fields are missing")
+1
src/routes/guestbook/+page.svelte
··· 30 30 class="text-lg ml-0.5 bg-inherit resize-none text-shadow-white placeholder-shown:[text-shadow:none] [field-sizing:content]" 31 31 name="content" 32 32 placeholder="say meow!" 33 + maxlength="512" 33 34 required 34 35 /> 35 36 <p class="place-self-end text-sm font-monospace">