Function escapeString