Honestly, I take my horses after aggressive dogs. If I'm not riding on their property and their dog is coming off of it to come after my horse, I consider it fair game. Usually turning your horse on a dog turns the table. Just trotting up after it will send most dogs running with their tail between their legs.
Running away makes most things worse as the horse gets more and more nervous and the dog gets more and more excited at the prospect of the chase.
My horses are not afraid of friendly dogs that can mind their own business. My dog often rides out with me (on my own property, never when we leave it) and its never a problem. But my mare, and most horses I know, can be horribly reactive to dogs that would aggressively get under her and go after her. Some horses react differently to chasing aggressive dogs. My mare seems to get an instant spark of confidence when she's moving towards the dog, my former gelding would actually get very aggressive back and grab a hold of them with his teeth and shake them if he could, often times I had to hold him back. My current gelding thinks its a game and is always ready to go.
If people are out there, I don't change what I do. The dog left their property. I wasn't on it. I've never had a dog get seriously hurt or killed, sure it could happen, but I'm willing to take that chance. If they ask questions or get pissy, I tell them that their dog chased me first and left their property. There's leash laws off of the home property so they can bugger off and train their dogs better or confine them. Leash laws are in place to protect livestock, pets, and people. A loose dog is a hazard.