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

Fixed terminaltables IndexError #800

Merged
merged 1 commit into from
Aug 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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