Strip escape sequences anywhere they do not belong.
Pylint fix.
Fix pylint
Fix pylint (again)
Merge pull request #13517 from cro/esc_sequences_develop

Strip terminal escape sequences when unnecessary.