Correctly handle escaping in completions.