Fix to color normalization end tag in telnet. Resolves #1306.

This commit is contained in:
Griatch 2017-04-17 08:52:18 +02:00
parent 0fb7d13d63
commit bc1f5f0fc9

View file

@ -337,7 +337,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
else:
# we need to make sure to kill the color at the end in order
# to match the webclient output.
linetosend = ansi.parse_ansi(_RE_N.sub("", text) + ("|n" if text[-1] != "|" else "||n"),
linetosend = ansi.parse_ansi(_RE_N.sub("", text) + ("||n" if text.endswith("|") else "|n"),
strip_ansi=nocolor, xterm256=xterm256, mxp=mxp)
if mxp:
linetosend = mxp_parse(linetosend)