# MathJax not working in poll options

**URL:** https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632
**Category:** Bug
**Tags:** polls, math, fixed
**Created:** [June 18, 2025, 6:16am UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632 "2025-06-18T06:16:58Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ascension.forum](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ascension.forum](https://meta.discourse.org/u/ascension.forum)
#### Post date: [June 18, 2025, 6:16am UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/1 "2025-06-18T06:16:58Z")

</div>

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!!)](https://ascension.forum/t/just-a-random-math-exercise-6-17-2025-even-harder/140)

 ![This image depicts a math quiz problem presented in a software interface requiring bounds on square segments to divide its area into three equal parts. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/2/9/e/29e219550c278889c5fd91a28be23e36f2862739.png)

---

<div class="post-metadata">

### Author: ![ascension.forum](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ascension.forum](https://meta.discourse.org/u/ascension.forum)
#### Post date: [June 19, 2025, 2:11pm UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/2 "2025-06-19T14:11:08Z")

</div>

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](https://meta.discourse.org/t/rendering-math-inside-polls/185009/2?utm_source=chatgpt.com)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 22, 2025, 10:11pm UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/4 "2025-06-22T22:11:40Z")

</div>

I will have a fix for this next week.

---

<div class="post-metadata">

### Author: ![ascension.forum](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ascension.forum](https://meta.discourse.org/u/ascension.forum)
#### Post date: [June 23, 2025, 5:52am UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/5 "2025-06-23T05:52:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 23, 2025, 7:43am UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/6 "2025-06-23T07:43:17Z")

</div>

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

[https://github.com/discourse/discourse-math/commit/e7ef2ec223d661954b870216d6da61bda8a677c5](https://github.com/discourse/discourse-math/commit/e7ef2ec223d661954b870216d6da61bda8a677c5)

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.

---

<div class="post-metadata">

### Author: ![ascension.forum](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ascension.forum](https://meta.discourse.org/u/ascension.forum)
#### Post date: [June 24, 2025, 3:09am UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/8 "2025-06-24T03:09:01Z")

</div>

Thank you @j.jaffeux 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!

---

<div class="post-metadata">

### Author: ![ascension.forum](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ascension.forum](https://meta.discourse.org/u/ascension.forum)
#### Post date: [June 26, 2025, 6:03am UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/10 "2025-06-26T06:03:45Z")

</div>

Hi @j.jaffeux, 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.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [July 3, 2025, 4:24am UTC](https://meta.discourse.org/t/mathjax-not-working-in-poll-options/370632/12 "2025-07-03T04:24:21Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
