thunderbird / thunderbird/thunderbird-android

Sanitize HTML of original message before using it as quoted text

Open
#2,517 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Right now the code in QuotedMessagePresenter uses the HTML of the original message pretty much as is. But we should clean it before using it as quoted text.
We should also avoid parsing the HTML body multiple times. At the same time we want to abstract from the jsoup classes. So we'll probably want a HtmlDocument class that can be used to pass the sanitized document to e.g. HtmlSignatureRemover and HtmlQuoteCreator.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the HTML flow through QuotedMessagePresenter and inspect how HtmlSignatureRemover and HtmlQuoteCreator currently use jsoup. The work is done when the original message is sanitized before becoming quoted text, parsed only once, and passed to those components through an HtmlDocument abstraction.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.