properly escape sequences of invisible characters

fixes #1