I had a similar experience a few years ago in the US where I used the word "savagely" to describe something and it was in a political discussion online. I had no idea that it was a word used to insult African Americans as it certainly wasn't used like that in the UK where I grew up.
Several people in the discussion blew up at me, before my friend (the OP), explained my lack of knowledge of the slur.
I was very sorry to have offended the people who were offended but I also feel that if you have no reason to know how offensive a word is (and not just because of willful ignorance), you take it on board and move on.