Skip to content

Commit 7f05244

Browse files
beledouxdenissethmlarson
authored andcommitted
email: do not fold WhiteSpaceTerminal not starting with a WSP
e.g. with a 40 characters length policy, the below `((loremipsum)(loremipsum)(loremipsum)(loremipsum))<spy@example.org>` should not be folded to `((loremipsum)(loremipsum)(loremipsum)\n(loremipsum))<spy@example.org>` but should rather stay `((loremipsum)(loremipsum)(loremipsum)(loremipsum))<spy@example.org>` to prevent to add a new line not starting with a space / with no indentation
1 parent 6142a37 commit 7f05244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/email/_header_value_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ def value(self):
949949
return ' '
950950

951951
def startswith_fws(self):
952-
return True
952+
return self and self[0] in WSP
953953

954954

955955
class ValueTerminal(Terminal):

0 commit comments

Comments
 (0)