Add escaping processing and escaping tests