Fixed a bug in EscapeString