If it was only a frank friendship, there was no reason for hiding the same from the husband so far and also there may not have been any fear in your mind necessitating you to seek legal precautions from this forum, to be taken before meeting a friend's husband! Moreover, knowing well that her husband doesn't like or don't approve of such a friendship with you by his wife , inspite of that your eagerness to continue such a friendship with someone's wife is deplorable. Obviously, you may well be reason for the husband ill-treating his wife. Therefore, if you have any sincere concern for the happy family life your friend, you should be prudent enough to snap your friendship with her rather than making lives of all concerned in miserable situation.
Even if the husband is I'll treating his wife as alleged, being a matter purely between the husband & wife, it is for them to settle amongst themselves rather than involving any outsider if both of them are serious enough to lead a peaceful family life.