Fix bpo-36041: fix folding of quoted string in display_name violates RFC · Pull Request #12054 · python/cpython
added 2 commits
February 26, 2019 14:21For display names that are longer than the policy's maximum line length, the folding process removes the quotes from the display name which may violate the structure of an address header if the content of the display name is specifically formed.
Since the _refold_parse_tree is context unaware, the function is unable to determine if we can directly encode the text into the header. In the language of RFC 5322, _refold_parse_tree is unaware if it is folding a structured header or an unstructured header. Since a quoted string will always be acceptable for both header types, when a quoted string needs to be refolded (because it would make the line overflow) prepare quoted children instead of the usual semantic children of the BareQuotedString.
ghost
changed the title
bpo-36041
Fix bug 36041: folding of quoted string in display_name violates RFC
ghost
changed the title
Fix bug 36041: folding of quoted string in display_name violates RFC
bug 36041: fix folding of quoted string in display_name violates RFC
ghost
changed the title
bug 36041: fix folding of quoted string in display_name violates RFC
Fix bpo-36041: fix folding of quoted string in display_name violates RFC
ghost
closed this by deleting the head repository
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters