I'm planning to tell a potentially racist joke.
Why would you choose to tell a joke you know might be racist?
Because I think it will cheer my friend up.
It's nice to want to cheer up a friend. But telling racist jokes is never okay. You need to find a better way to make your friend feel better.
Joke or not, anyone who doesn't like it can fuck off. That's my crazy opinion.
It seems perfectly reasonable that someone would be upset by a racist joke. Perhaps you're being a little harsh; others are entitled to their opinions like yours, and you shouldn't be so quick to judge.