The man, in his 30s, had been driving along Wood Street in Wakefield when the suspect's car stopped alongside his.
Police said the substance was sprayed through an open window.
Two men, aged 32 and 33, were arrested on suspicion of affray, soon after the incident, which occurred at around 2.15pm on Friday, September 15.
Both men have been released pending further enquiries.
The victim was taken to hospital and was found to have no injuries.
Anyone with information is asked to contact police on 101, quoting crime reference 13170426818.