Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #800 from SimonHertoge/master
Browse files Browse the repository at this point in the history
Fixed terminaltables IndexError
  • Loading branch information
botherder authored Aug 5, 2022
2 parents 6fb65c7 + 67d7217 commit cd532ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion viper/common/out.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def table(header, rows):
a = a.decode('utf-8', 'backslashreplace')
if not isinstance(a, six.text_type):
a = six.text_type(a)
to_append.append(a.replace('\t', ' ').replace('\v', '\\v'))
# Prevents terminaltables from parsing escape characters
to_append.append(a.replace('\t', ' ').replace('\v', '\\v').replace('\f', '\\f').replace('\r', '\\r').replace('\n', '\\n'))
content.append(to_append)
t = AsciiTable(content)
if not t.ok:
Expand Down

0 comments on commit cd532ca

Please sign in to comment.