That's why I don't let the windows go down enough so that they can stick their heads out, let alone their body. I'm sorry your friend had to go through that though.

You can get dog seatbelts/harnesses for vehicles, and many people just travel with their dog in a crate.