Problem with HTML code in a message
Hi everyone,
i'm trying to send an HTML table in a email using python, but everything is okey with that (i said it just to give info). This is the text of an example email i send with python (printed just before to be sent):
TABLE
COLUMN1 | COLUMN2 |
---|---|
DATA1 | <a href=webexample.com>DATA2</a> |
Everything is okey but, when i read with Thunderbird some emails with tables, this tables are corrupted BY A WHITESPACE that wasn't at first in the html email code. As i seen, it happens when some tag like <td> is at the end of a html line and Thunderbird write the first half of the tag in one line and A WHITESPACE WITH THE OTHER HALF PART in the other line. Here is an example from the font code of an email in Thunderbird:
TABLE
<COLUMN1 | COLUMN2 |
---|---|
DATA1 |
All Replies (4)
Okey this webpage have interpreted the html code i posted. I add an image with the code:
You have <th>COLUMN2</th1>
(That is IMHO a hideously unreadable font…)
I use < to generate a < character that the forum engine won't parse. Occasionally a leading space or the <code>…</code> and <pre>…</pre> tags work.
Note that a line with a leading space is formatted as if code.
But even with all these I think you still need to escape the '<'. :-(
Endret
I wonder if you might avoid some problems by wrapping your lines, thus:
<table border="1"> <tr><th>COLUMN1</th><th>COLUMN2</th></tr> <tr><td>DATA1</td><td>DATA2</td></tr> </table>
Thank you! I think i will coding your second solution, it is just parsing the lines, bored but it will work.