From 8afdbc6adbffb63d3d777f6f0a0a15fa8bafd491 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 20 Aug 2014 20:15:11 +0200 Subject: [PATCH] Changed ansi parser to strip hard-coded ansi codes inserted raw into the stream, as discussed in #551. --- src/utils/ansi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/ansi.py b/src/utils/ansi.py index 84d7a7f54d..3355f41cca 100644 --- a/src/utils/ansi.py +++ b/src/utils/ansi.py @@ -189,6 +189,9 @@ class ANSIParser(object): if not string: return '' + # remove hard-coded strings + string = self.strip_raw_codes(string) + # check cached parsings global _PARSE_CACHE cachekey = "%s-%s-%s" % (string, strip_ansi, xterm256)