The current CONTROL_CODE_RE_STR does not seem to clean the string from escape sequences (especially those ending with arrow/pagedown).
I'd try to add a new regex for a two step cleanup using this time this one:
'(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]'
Credits: http://stackoverflow.com/a/33925425/1154487
And we need a new unit test to check it works (and not regress)
« Back to merge proposal
The current CONTROL_CODE_RE_STR does not seem to clean the string from escape sequences (especially those ending with arrow/pagedown).
I'd try to add a new regex for a two step cleanup using this time this one:
'(\x9B| \x1B\[) [0-?]*[ -\/]*[@-~]'
Credits: http:// stackoverflow. com/a/33925425/ 1154487
And we need a new unit test to check it works (and not regress)