Fix escaping of special characters