forked frompython/cpython
- Notifications
You must be signed in to change notification settings - Fork6
Commit6f2f475
authored
bpo-40597: email: Use CTE if lines are longer than max_line_length consistently (pythongh-20038)
raw_data_manager (default for EmailPolicy, EmailMessage)does correct wrapping of 'text' parts as long as the message containscharacters outside of 7bit US-ASCII set: base64 or qpContent-Transfer-Encoding is applied if the lines would be too longwithout it. It did not, however, do this for ascii-only text,which could result in lines that were longer thanpolicy.max_line_length or even the rfc 998 maximum.This changeset fixes the heuristic so that if lines are longer thanpolicy.max_line_length, it will always apply acontent-transfer-encoding so that the lines are wrapped correctly.1 parent3d17c04 commit6f2f475
File tree
3 files changed
+23
-7
lines changed- Lib
- email
- test/test_email
- Misc/NEWS.d/next/Library
3 files changed
+23
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
332 | 347 | | |
333 | 348 | | |
334 | 349 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments
Comments
(0)