feat: replies mirror the thread view mode (html vs plaintext) #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pr/html-replies"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replies mirror the thread view mode (HTML ↔ plaintext) + renderable-fragment fix.
Replying/forwarding composes in the format you were viewing:
>quoted text, unchangedFix for full-document mail (the reported issue): marketing emails are full documents (
<html><head><meta>+<style>). Chromium renders them in the view, but Qt's compose editor can't — head/style were leaking as raw text. Now the quote:<body>inner HTML (html_utils.html_fragment), dropping head/style/script wrappersQTextEditcan actually render) and strips the rest instead of escaping it, so<h1>/<p>render as rich text rather than<h1>text<script>is dropped entirely from the outgoing mailPlumbing: the view's
html_modetravelsopen_compose(mode, msg, html=…)→ComposeSeed.body_html→RichTextEditor.setHtml, with plaintext fallback for bodyless-HTML mail. List replies usedefault_to_html. Signatures render at top in both modes.Tests: +8 (HTML seeds, full-document fragment regression ×2 — seed and compose-panel — sanitisation, signature, fallback, plain-mode unchanged). Suite: 151 passed, mypy 0.
Eyeball: reply to a marketing email in HTML view — the compose editor should show the body rendered (headings, text) with no
<style>/charsetleakage; send it and check your Sent folder.Pull request closed