added functions for escaping the full string sequence