Commit 6fa14f28 authored by walkingphasers's avatar walkingphasers Committed by valtron

Fix #96

parent f091aeaf
......@@ -157,7 +157,8 @@ def _msnp_encode(m: List[object], buf, logger) -> None:
if isinstance(m[-1], bytes):
data = m[-1]
m[-1] = len(data)
m = tuple(str(x).replace(' ', '%20') for x in m if x is not None)
#TODO: Escape `%` properly for anything that isn't already escaped of that character
m = tuple(str(x).replace(' ', '%20').replace('\r', '%0D').replace('\n', '%0A') for x in m if x is not None)
_truncated_log(logger, '<<<', m)
w = buf.write
w(' '.join(m).encode('utf-8'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment