Added escapeId function to support more operators