properly escape sequences of invisible characters

fixes issue #1