Here's one of the weirder bugs I've seen in some time:
I have no idea why the user in question chose to enter... whatever that string is, as their location. I don't really care - I think it's weird, but it's their profile page and they can do whatever they want with it. I imagine it's some kind of hash, which would not be unreasonable. (Or it's just a random string. Not that you'd be able to tell the two apart.)
In any case, it's probably a good idea for the profile-page code to:
Impose a maximal character length for the location when it is displayed in the users table. Regardless of the failed MathJax, user locations shouldn't be breaking the overall formatting anyways.
Alternatively, impose a meaningful CSS height limit on that box.
Sanitize dollar signs, at least in sites that use MathJax. We can probably assume reasonably safely that people aren't going to be using MathJax in their location fields.
Scratch that - and punch it in as another entry for "falsehoods programmers believe". A quick query pulls seven users on Physics with dollar signs in their Location field, four of which are intentional MathJax users; ditto with the maths site. This may be unsolvable but maybe there's a better approach?
For this specific user, they either want to have the dollar signs display (in which case, it's just a matter of pointing this out and getting them to
\$escape them), or they intentionally added a
$...&...$MathJax error to make it bug out? The latter strikes me as unlikely (but potentially abusive behaviour if it is). I don't know what to do on more general cases, though.
Either way, the MathJax compilation error strikes me as not-a-bug anymore: it's just the system behaving as intended (providing MathJax compilation to users if they want to sue it) with a failed compilation much like you get elsewhere. However, perhaps there's some room to raise some flags that could be raised at character-entry time to say "this isn't going to look like you think it's going to look.