Unexpected HTML when adding table to footer

Version 5.10.31

Checklist

Describe the bug

When adding a table to the invoicing footer, the generated HTML contains a lot of added <br> tags.
Furthermore, the footer is after the p tags I expected it to be in according to the template.

I have the feeling this is rather new maybe since the tiny editor was added, maybe because of how the input from there is processed?

Steps To Reproduce

Best visible when selecting the “Bold” invoice design cause then the table will vanish completely (our case) but works in any design - simply put a table into the footer (using the raw edit function), such as:

Example Placeholder Text for Your Message! Please transfer the due amount within the payment period.
<table style="width: 100%; border-collapse: collapse;">
  <tr>
    <td>Example Corporation Ltd.</td>
    <td>CEO John Doe</td>
    <td>First National Bank</td>
  </tr>
  <tr>
    <td>Main Street 123</td>
    <td>Company Registration 123456</td>
    <td>IBAN XX12345678901234567890</td>
  </tr>
  <tr>
    <td>12345 Example City</td>
    <td>Tax ID: 123/456/7890</td>
    <td>BIC ABCDDEFXXX</td>
  </tr>
</table>

And have a look at the preview.

Expected Behavior

No odd spacing between the table, and placeholders inserted where they are mentioned in the invoice design.

Screenshots

Our Server, design edit form:

Invoice preview on demo page:

Hi,

I suggest creating a discussion on GitHub to get input from the backend developers.