MathJax not working in poll options

Not sure if this should be a bug for the MathJax plugin, but when you add a MathJax expression to a poll, it won’t be rendered correctly (MathJax renders properly in topics body and it also works in the poll preview panel, see screenshot below).

A live repro is at Just a random math exercise - 6/17/2025 (even harder!!)

1 Like

Found this post and this is a known issue. I’ll need to check how hard to make the code change. Rendering math inside polls - Feature - Discourse Meta

2 Likes

I will have a fix for this next week.

2 Likes

This will be superb! I’m new to Ruby and still trying to setup the dev environment. Your help will be a great save! Looking forward to your PR.

I’m afraid you won’t learn much from the change, it’s a little bit of a dark magic change.

Poll is an old plugin and it’s probably doing something incorrect which forces me to do this here. I saw the issue but honestly didn’t dig the root cause as this interaction discourse-math/poll is quite a niche subject in our codebase and couldn’t justify spending days on it.

4 Likes

Thank you @joffreyjaffeux for sharing the PR! Even though I don’t know how the PR solves the issue, but the elegance and the speed of the change are impressive!

1 Like

Hi @joffreyjaffeux, I tried the latest build with your fix, and it works as expected. Only issue is that the fix seems not to be applied to on the Vote results view. This is a minor issue but just want to share here in case you are interested.

it would be nice if we allow discourse math to work in hidden details panes aswell?