update escapeSearchPattern