Project

General

Profile

Actions

Feature #31231

closed

Better handling of HTML tables when creating an issue from an email

Added by Go MAEDA over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email receiving
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

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


Files

better-handling-of-html-tables.patch (1.91 KB) better-handling-of-html-tables.patch patch (without tests) Go MAEDA, 2019-04-20 09:57
add-tests.patch (2.31 KB) add-tests.patch Mizuki ISHIKAWA, 2019-05-24 08:02
better-handling-of-html-tables-v2.patch (1.47 KB) better-handling-of-html-tables-v2.patch Go MAEDA, 2019-08-18 16:33

Related issues

Blocked by Redmine - Defect #31232: Text may unexpectedly be enclosed in pre tags when an issue is created via HTML emailClosedJean-Philippe Lang

Actions
Actions #1

Updated by Go MAEDA over 5 years ago

  • Description updated (diff)
Actions #2

Updated by Go MAEDA over 5 years ago

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

Updated by Mizuki ISHIKAWA over 5 years ago

I have attached a patch to add a test.

Actions #4

Updated by Go MAEDA over 5 years ago

  • Target version set to Candidate for next major release
Actions #5

Updated by Marius BĂLTEANU over 5 years ago

Very nice feature, but it doesn't apply cleanly on the current trunk. Can you update the patch? I would like to add support for lists (<ul>) as well.

Actions #6

Updated by Marius BĂLTEANU over 5 years ago

  • Assignee set to Go MAEDA
Actions #7

Updated by Go MAEDA over 5 years ago

Updated the patch for the current trunk (r18375).

Actions #8

Updated by Go MAEDA over 5 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Committed the patches.

Actions #9

Updated by Go MAEDA over 5 years ago

  • Subject changed from Better conversion of HTML tables when receiving emails to Better handling of HTML tables when creating an issue from an email
Actions

Also available in: Atom PDF