Added character replacement for escape characters