diff --git a/components/ComposeEmail.tsx b/components/ComposeEmail.tsx index eb08d6a4..bc0614dc 100644 --- a/components/ComposeEmail.tsx +++ b/components/ComposeEmail.tsx @@ -132,6 +132,19 @@ export default function ComposeEmail({ // Parse the email to get headers and content - using the same function as panel 3 const decoded = await decodeEmail(emailToProcess.content); + // This is exactly how panel 3 handles email content - simple sanitization of HTML or showing text + let cleanContent = ''; + + if (decoded.html) { + // Just sanitize the HTML directly - same as panel 3 + cleanContent = DOMPurify.sanitize(decoded.html); + } else if (decoded.text) { + // Use whitespace-pre-wrap for text - same as panel 3 + cleanContent = `