use escape() instead of substitute()