parse only allowed escape sequences
this is probably correct