I worked as a dog walker for about 10 years and I can say that the advice here is quite solid.
One bit of advice that I don't believe was covered in this article is that prevention is the best way to stop a dog fight. Be aware of your dog and the other dogs around them. Be aware of your dog's body language and recognize when they're uncomfortable. Take immediate action to remove them from uncomfortable situations and show them that you're in control of the situation and you're watching out for them. Don't rely on other people to reign in their dogs, if another dog is acting badly and the owner won't address it then you should leave immediately.
In short: Be aware. Recognize discomfort. Take control. Remove yourself and your dog before anything even has a chance to escalate.