Employees are not the only ones involved. For example, it might be about a supplier or a delivery person making sexist comments to the receptionist. In that case, the employer can take steps against the person making the comments. The intention of the alleged harasser is not important; what is important is the effect that the actions have on the person allegedly being harassed. You cannot get out of it by saying that you did not want to cause any harm. The question is whether there was harm.
On February 28th, 2018. See this statement in context.