Skip to content

RFC-5321 (§4.5.3.1.6) should be respected by MIMEText if possible #125867

@azmee-meta

Description

@azmee-meta

Bug report

Bug description:

When there is lots of

<tr>
	<td>36</td>
	<td>16</td>
	<td>-56%</td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
	<td></td>
</tr>
<tr>
	<td></td>
</tr>

(i make this code dynamically, which sometimes lead to very big table/code, in that case the issue arise)

like this, then sometimes in <td> or <tr> tag render like this (< td> < tr>, put space unexpectedly) and the table breaks in the email body.

Note: i am using a little inline css in table:

<html lang='en'>
<head><meta charset='UTF-8'></head>
<body><table border=1 bordercolor='black' cellspacing=0 cellpadding=5> <tr>

and

msg.attach(MIMEText(html, 'html'))

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-emailtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions