Aaryn Tonita <aa...@startmail.com> added the comment:

Hi David, the problem is in email._header_value_parser._refold_parse_tree.

Specifically, when the parsetree renders too long, it recursively gets newparts 
= list(part) (the children). When it does this to a BareQuotedString node, the 
child nodes are unquoted and unescaped and it just happily serializes these.

I thought I had attached a file that monkey patches the _refold_parse_tree 
function with a fixed version... let me try again.

----------
Added file: https://bugs.python.org/file48158/address_folding_bug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36041>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to