fix header handling (again)
This commit is contained in:
@@ -37,7 +37,10 @@ def decode_header(header):
|
||||
encoding = "ascii"
|
||||
result = dheader[0].decode(encoding, errors="replace") if isinstance(dheader[0], bytes) else dheader[0]
|
||||
header_strs.append(result)
|
||||
return "".join(header_strs)
|
||||
header_text = "".join(header_strs)
|
||||
header_text = re.sub(r"\n(\s)", r" ", header_text)
|
||||
#header_text = re.sub(r"\n(\s)", r"", header_text)
|
||||
return header_text
|
||||
|
||||
def get_body_text(msg):
|
||||
# from https://stackoverflow.com/a/1463144
|
||||
|
||||
Reference in New Issue
Block a user