Feature #31231

Better conversion of HTML tables when receiving emails

Added by Go MAEDA 2 months ago. Updated 23 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:Candidate for next major release
Resolution:

Description

In the email receiving feature, each cell in HTML tables is converted to a single line with blank lines before and after. As a result, a table is converted to a long sparse text and the appearance is not good.

I think we can improve the appearance and readability by grouping the converted text by row.

[Input]

<table>
  <tr>
    <th>Name (en)</th>
    <th>Name (fr)</th>
    <th>Code</th>
  </tr>
  <tr>
    <td>red</td>
    <td>rouge</td>
    <td>#ff0000</td>
  </tr>
  <tr>
    <td>green</td>
    <td>vert</td>
    <td>#00ff00</td>
  </tr>
  <tr>
    <td>blue</td>
    <td>bleu</td>
    <td>#0000ff</td>
  </tr>
</table>

[Output (before)]

Name (en)

Name (fr)

Code

red

rouge

#ff0000

green

vert

#00ff00

blue

bleu

#0000ff

[Output (after)]

*Name (en)*
*Name (fr)*
*Code*

red
rouge
#ff0000

green
vert
#00ff00

blue
bleu
#0000ff

better-handling-of-html-tables.patch Magnifier - patch (without tests) (1.91 KB) Go MAEDA, 2019-04-20 09:57

add-tests.patch Magnifier (2.31 KB) Mizuki ISHIKAWA, 2019-05-24 08:02


Related issues

Blocked by Redmine - Defect #31232: Text may unexpectedly be enclosed in pre tags when an iss... Closed

History

#1 Updated by Go MAEDA 2 months ago

  • Description updated (diff)

#2 Updated by Go MAEDA 2 months ago

  • Blocked by Defect #31232: Text may unexpectedly be enclosed in pre tags when an issue is created via HTML email added

#3 Updated by Mizuki ISHIKAWA about 1 month ago

I have attached a patch to add a test.

#4 Updated by Go MAEDA 23 days ago

  • Target version set to Candidate for next major release

Also available in: Atom PDF