Harden auth, payments, and frontend against review findings.
Close exploitable gaps in booking/payment flows, enforce token versioning and account checks, gate sensitive payment data, and add middleware plus input validation across admin routes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,11 +14,18 @@ interface RichTextEditorProps {
|
||||
editable?: boolean;
|
||||
}
|
||||
|
||||
// Escape HTML-significant characters so any raw HTML embedded in the markdown source
|
||||
// is neutralised before we layer our own generated tags on top (defense-in-depth;
|
||||
// the public renderer escapes too, and TipTap sanitizes via its schema).
|
||||
function escapeRawHtml(s: string): string {
|
||||
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
}
|
||||
|
||||
// Convert markdown to HTML for TipTap
|
||||
function markdownToHtml(markdown: string): string {
|
||||
if (!markdown) return '<p></p>';
|
||||
|
||||
let html = markdown;
|
||||
let html = escapeRawHtml(markdown);
|
||||
|
||||
// Convert horizontal rules first (before other processing)
|
||||
html = html.replace(/^---+$/gm, '<hr>');
|
||||
|
||||
Reference in New Issue
Block a user