From ffe6593361670a5963d2e07ed6ac2d5f022a66e7 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 25 Jul 2016 14:37:19 -0700 Subject: [PATCH] make sure to escape errors printed to the console --- mitmproxy/builtins/dumper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mitmproxy/builtins/dumper.py b/mitmproxy/builtins/dumper.py index 74c2e6b2e..59f9349d7 100644 --- a/mitmproxy/builtins/dumper.py +++ b/mitmproxy/builtins/dumper.py @@ -231,7 +231,8 @@ class Dumper(object): self._echo_message(f.response) if f.error: - self.echo(" << {}".format(f.error.msg), bold=True, fg="red") + msg = strutils.escape_control_characters(f.error.msg) + self.echo(" << {}".format(msg), bold=True, fg="red") def match(self, f): if self.flow_detail == 0: