Fixed _replace_scape_codes