#4510·harper

Skip quoted text and signatures when replying to or forwarding e-mail

Author: brakloCreated Sep 30, 2026Updated Sep 30, 2026

What problem does this solve? When I reply to or forward an e-mail, most of the editor is text I did not write: the quoted message, the forwarded thread and my signature. Harper checks all of it. I get underlines in other people's text that I am not going to change, and in a long thread the number of lints makes the page slow. In the Thunderbird compose window with a long forwarded thread it was about 800 lints, and rendering them took about a second each time.

There is also a technical side. In Thunderbird the text I type sits directly in <body>, so the whole message becomes one target and its innerText includes the quoted thread. Skipping the quoted elements when scanning for targets is therefore not enough on its own.

Proposed Solution Treat quoted content in e-mail editors the same way Harper already treats contenteditable="false", disabled and readonly: leave it unchecked.

  • Skip blockquote[type="cite"] (Thunderbird, Apple Mail and other clients), Thunderbird's .moz-cite-prefix, .moz-forward-container and .moz-signature, and Gmail's .gmail_quote and .gmail_signature.
  • When the user starts editing a quoted block, check that block from then on, so edits inside a quote are not left unchecked.
  • When skipped content sits inside a target, build the target's text from its leaf nodes with the skipped text replaced by whitespace of the same length. The offsets then still match the DOM ranges, so the lints in the user's own text are underlined in the right place.

Examples A reply like this should get one underline, in the first line only, not two:

xml
<div contenteditable="true">
  This is an test of the Harper grammar checker.<br /><br />
  <div class="moz-cite-prefix">On Monday, someone wrote:<br /></div>
  <blockquote type="cite">This is an test in a quoted message.</blockquote>
</div>

Component

  • Core engine
  • Plugin/Extension
  • Other: _____

Additional Context I have a working implementation with Playwright tests on the branch braklo:pr/email-quotes and have been using it in Thunderbird (see #1425). Before opening a pull request I would like to know whether this fits Harper and whether the list of selectors is acceptable. Outlook on the web, for example, marks quotes differently and is not covered. I worked on this with an AI agent. I have reviewed the AI parts and edited them when appropriate.