modify criteria for escaping string