Yes, because onions also contain allicin, one of the most common substances in mosquito repellants.