escape quotes on replace method