Parse name="quote" divs (#2104)

fix #1560 Replies in html-only format are not converted nicely wrt Quoting
This commit is contained in:
Hocuri
2020-12-13 18:02:20 +01:00
committed by GitHub
parent 518e87b0cf
commit ec83fae314
6 changed files with 245 additions and 31 deletions

View File

@@ -0,0 +1,47 @@
Return-Path: <bob@example.org>
User-Agent: K-9 Mail for Android
In-Reply-To: <hasnihae@gmx.de>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----MLV7YOLJ7ED4UZKNGQYQ63O0RJGHU0"
Content-Transfer-Encoding: 7bit
Subject: Re: Test
To: Alice <alice@example.org>
From: Bob <bob@example.org>
Message-ID: <haeisnr@example.org>
------MLV7YOLJ7ED4UZKNGQYQ63O0RJGHU0
Content-Type: text/definitelynotplainthiswouldbetooeasy;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hi Alice,
some text.
Am 21=2E Juni 2020 10:38:44 MESZ schrieb Alice <alice@example=2Eorg>:
>Dear Bob,
>
>let's meet
>
>Alice
--=20
Diese Nachricht wurde von meinem Android-Ger=C3=A4t mit K-9 Mail gesendet=
=2E
------MLV7YOLJ7ED4UZKNGQYQ63O0RJGHU0
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body>Hi Alice,<br><br>some text.<br><br>
<div class=3D"gmail_quote">Am 21=2E Juni 2020 10:38:44 M=
ESZ schrieb Alice &lt;jonathanschmiederer@gmx=2Ede&gt;:<bloc=
kquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0=2E8ex; border-l=
eft: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class=3D"k9mail">Sehr geehrte/r Frau/Herr Brenner,<br><br>ich habe in=
meinen JuFo-Unterlagen den angeh=C3=A4ngten Gutschein gefunden=2E<br>Ist e=
s noch m=C3=B6glich, diesen einzul=C3=B6sen?<br><br>Mit freundlichen Gr=C3=
=BC=C3=9Fen<br>Alice<br></pre></blockquote></div><br>-- <br>=
Diese Nachricht wurde von meinem Android-Ger=C3=A4t mit K-9 Mail gesendet=
=2E</body></html>
------MLV7YOLJ7ED4UZKNGQYQ63O0RJGHU0--

View File

@@ -0,0 +1,14 @@
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Test</div>
<div>&nbsp;
<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Freitag, 04. Dezember 2020 um 18:46 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Bob&quot; &lt;bob@gmx.de&gt;<br/>
<b>An:</b>&nbsp;alice@gmx.de<br/>
<b>Betreff:</b>&nbsp;test</div>
<div name="quoted-content">test</div>
</div>
</div>
</div></div></body></html>

View File

@@ -0,0 +1,38 @@
Return-Path: <alice@gmx.de>
Delivered-To: bob@gmx.de
MIME-Version: 1.0
Message-ID: <trinity-fa44240c-65ef-4323-b531-d1d3e5e84313-1607428795002@3c-app-gmx-bs36>
From: Alice <alice@gmx.de>
To: bob@gmx.de
Subject: Aw: Re: Re: Re: Message from bob@gmx.de
Content-Type: text/html; charset=UTF-8
Date: Tue, 8 Dec 2020 12:59:55 +0100
Importance: normal
Sensitivity: Normal
In-Reply-To: <Mr.3p9V5c7XjPQ.bcqzV4ls4ID@testrun.org>
References: <Mr.SRvG2sUyI8E.pASbMFvaNqy@testrun.org>
<trinity-764a001f-6593-4c33-b681-942d2ffb9f9f-1607359668635@3c-app-gmx-bs26>
<Mr.3p9V5c7XjPQ.bcqzV4ls4ID@testrun.org>
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>YIPPEEEEEE</div>
<div>&nbsp;</div>
<div>Multi-line</div>
<div>&nbsp;
<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Dienstag, 08. Dezember 2020 um 12:59 Uhr<br/>
<b>Von:</b>&nbsp;bob@gmx.de<br/>
<b>An:</b>&nbsp;&quot;Alice&quot; &lt;alice@gmx.de&gt;<br/>
<b>Betreff:</b>&nbsp;Re: Re: Re: Message from bob@gmx.de</div>
<div name="quoted-content">Now?<br/>
<br/>
--<br/>
Sent with my Delta Chat Messenger: <a href="https://delta.chat" target="_blank">https://delta.chat</a><br/>
&nbsp;</div>
</div>
</div>
</div></div></body></html>