No, it's not always about security. In some cases, it's about how HTML communicates with the outside world.
It's not just here. I have website customers who regularly send me content to add to their sites, and this content sometimes includes "other" characters (aside from the usual letters and numbers). If I try to copy and paste the content as-is, directly from Microsoft Word or some other word processor, I get all kinds of added code and garbled text where the web page is supposed to be. I have to strip it clean, either by running it through Notepad frst, or by manually going in and deleting all of the added code (mostly CSS additions, but not always).
As for your math problems, have you tried shutting off HTML for that forum? I know, it's a pain in the ***, but it might just solve that problem. For people that want to post images or other HTML, you just add a second forum where that is allowed, but math code isn't. I'm not sure if there's another way around it.
RipperNetwork54 Forum Tech TipsAirbrush and Paint Tech Forums