diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-02 17:46:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-04 12:52:30 +0200 |
| commit | e8bf3a12cd24780dbe59c8798b1eb6536c9828d0 (patch) | |
| tree | 863d5f424a4f826e7f816ecf85887772f0b2abd8 /src/main.cpp | |
| parent | 5690c50ff9a6ef4555c2c4ccd9a7dbd7dc172c7a (diff) | |
| download | qtmaildir-e8bf3a12cd24780dbe59c8798b1eb6536c9828d0.tar.gz qtmaildir-e8bf3a12cd24780dbe59c8798b1eb6536c9828d0.zip | |
feat: add HTML builder and cid: scheme handler
HtmlBuilder renders parsed messages (and whole threads, as one document,
so newsletter threads don't spawn one Chromium process per message) into
the HTML string the web view loads. Plain text is escaped and quote lines
marked; the cid: rewrite is namespaced per message ("<prefix>!<id>") so
two thread messages sharing a Content-ID don't collide.
Hardened namespaceCids beyond the initial sketch after attacking it:
handles unquoted cid: attribute values, background=/poster= (not just
src/href), and CSS url(cid:...) in both style="" attributes and <style>
blocks, all case-insensitively. Replaced the greedy [^"']+ capture with
per-quote-style alternation so two cid: refs on one line can't bleed into
each other.
CidSchemeHandler serves cid: requests from the thread's inline-parts map,
keyed by the same namespaced string, replaced wholesale per thread.
Diffstat (limited to 'src/main.cpp')
0 files changed, 0 insertions, 0 deletions
