Description
Special control characters such as ANSI escape codes are included in calculation of row length (which is determined by string length). This results in table rows appearing larger than they should be.
Example:
This is used for the row (outlined); the ANSI escape sequence is red

This results in the following output:

(The affected row is red)
This is because the length of the ANSI escape characters in the example is 7, which results in 7 additional characters in the row cell:

Possible Solution
A possible solution would be using regex to filter such characters and escape sequences from the row content string, and using the resulting string length to determine the row length.
See Console virtual terminal sequences