Skip to content

Commit a1c1f71

Browse files
committed
todo
1 parent 9d304e0 commit a1c1f71

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/models/note.server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
//Todo
2+
//Sanitization:
3+
//Quill outputs HTML, which is stored in the body field and rendered with dangerouslySetInnerHTML. To prevent XSS attacks, consider sanitizing the HTML //server-side or client-side:
4+
//Server-Side: Use a library like sanitize-html in note.server.ts before saving or retrieving body.
5+
//Client-Side: Sanitize before rendering with dangerouslySetInnerHTML.
6+
//Example with sanitize-html (install with npm install sanitize-html
17
import type { User, Note } from "@prisma/client";
28
import { prisma } from "~/db.server";
39

0 commit comments

Comments
 (0)