+ );
+}
\ No newline at end of file
diff --git a/lib/mail-parser-wrapper.ts b/lib/mail-parser-wrapper.ts
index 383f388e..b54058a1 100644
--- a/lib/mail-parser-wrapper.ts
+++ b/lib/mail-parser-wrapper.ts
@@ -104,9 +104,19 @@ export async function decodeEmail(emailContent: string): Promise {
/**
* Cleans HTML content by removing potentially harmful elements while preserving styling.
* This is the centralized HTML sanitization function to be used across the application.
+ *
+ * Key features:
+ * - Safely removes scripts, iframes, and other potentially harmful elements
+ * - Optionally preserves and scopes CSS styles to prevent them from affecting the rest of the page
+ * - Fixes self-closing tags that might break in React or contentEditable contexts
+ * - Can add a wrapper div with isolation for additional safety
+ *
* @param html HTML content to sanitize
- * @param options Optional configuration
- * @returns Sanitized HTML
+ * @param options Configuration options:
+ * - preserveStyles: Whether to keep