escape the query and near parameters