RAW HTML signature, extra new line break added between sequential paragraphs

Description

When adding signature using raw HTML a element is inserted between repeating paragraphs

To Reproduce…

Add RAW HTML signature

<u style="color:blue;">Internet Disclaimer</u>
<p>This message (including any attachments) contains confidential information intended for a specific individual and purpose, and may be protected by law.</p>
<p>If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.</p>

Compose email and view in debug

Expected Behavior

Signature inserted into email should have following format:

<signature id="...">
<u style="color:blue;">Internet Disclaimer</u>
<p>This message (including any attachments) contains confidential information intended for a specific individual and purpose, and may be protected by law.</p>
<p>If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.</p>
</signature>

Noticed Output

<signature id="...">
<u style="color:blue;">Internet Disclaimer</u><p>This message (including any attachments) contains confidential information intended for a specific individual and purpose, and may be protected by law.</p>
<br>
<p>If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.</p></signature>

Setup

  • OS and Version: Pop OS Ubuntu 18.04
  • Mailspring Version: 1.7.5.a976d710

(Originally posted by colinbes on GitHub.)

I would like to confirm this for Ubuntu 21.04 at 1.9.1-30ef802f

Extra <br> tags are being added.
Found them using diff over saved signature vs HTML of email that actually arrived.