akrennmair / newsbeuter

Newsbeuter is an open-source RSS/Atom feed reader for text terminals.
http://www.newsbeuter.org/
MIT License
780 stars 97 forks source link

HTML renderer: colspan attribute processing is broken #306

Open Minoru opened 8 years ago

Minoru commented 8 years ago

colspan causes things to shift in a way they shouldn't. The following HTML:

<table border='1'>
    <tr>
        <th colspan='2'>hello</th>
        <th>world</th>
        <th>how</th>
        <th>are</th>
        <th>you</th>
    </tr>
    <tr>
        <td>one</td>
        <td>two</td>
        <td>three</td>
        <td>four</td>
        <td>five</td>
        <td>six</td>
    </tr>
</table>

renders as:

+---+-----+-----+----+----+---+
|hello    |world|how  |are |you |
+---+-----+-----+----+----+---+
|one|two  |three|four|five|six|
+---+-----+-----+----+----+---+

The first row there is obviously broken.

The same happens with <th> (i.e. when using <th colspan='2'> instead of <td colspan='2'>.)

thiagolcmelo commented 7 years ago

Hi, I am getting something similar.

When expecting

image

I am getting:

image

Minoru commented 7 years ago

Hi, @thiagolcmelo! Your screenshot doesn't look anything like Newsbeuter. Perhaps you commented in the wrong repository?