return None
header_str = str(sane_header)
+ header_str = header_str.replace('\x00', '')
return normalise_space(header_str)
if header is not None
]
- return '\n'.join(strings)
+ return '\n'.join(strings).replace('\x00', '')
def find_message_id(mail):
commentbuf = clean_content(commentbuf)
+ if patchbuf:
+ patchbuf = patchbuf.replace('\x00', '')
+
return patchbuf, commentbuf
sig_re = re.compile(r'^(-- |_+)\n.*', re.S | re.M)
content = sig_re.sub('', content)
- return content.strip()
+ return content.strip().replace('\x00', '')
def parse_patch(content):