# Why does not $a &lt; b$ render here?

On the MathJax demo page, entering a &lt; b results in $a<b$. This is consistent with MathJax documentation.

On Mathematics.SE the behavior is different: $a &lt; b$. This becomes a problem when one copies formulas from a comment into an answer, as mentioned here. In the HTML source of comments, < is replaced by &lt;

Can MathJax be configured to render $a &lt; b$ on this site?

Edit: I just came across another place where this issue arises:

Edit 2: I found the problem: SE escapes the ampersand in &lt; turning the string into &amp;lt;. And that is an HTML entity that MathJax does not support in present.

Either MathJax should interpret &amp;lt; as <, or SE should stop messing up &lt;

Related threads, all marked with :

• Example: $a < b$. – user127096 Apr 6 '14 at 18:05
• Viewing the source of this page, you'll see the above comment with $a &lt; b$. – user127096 Apr 6 '14 at 18:06
• Okay, I missed that it is supposed to work. I had just thought HTML entities were not supported in MathJax. I don't know why that is. I use the same MathJax header off site and it renders properly there. – robjohn Apr 6 '14 at 18:58
• I doubt SE will change this, not escaping < and > can be huge security issue, introducing any additional complexity in the sanitizing could easily introduce bugs that could be exploitable. – user9733 Apr 6 '14 at 19:12
• @MadScientist Escaping < isn't an issue, since &lt; is understood by MathJax. The problem is that SE escapes & in &lt;. Obligatory xkcd reference. By the way, the change in sanitizing can be localized to TeX markup, since it is processed by its own script before being handed off to MathJax. So it's not entirely unrealistic, but of course of lower priority than, say, Unicoins. – user127096 Apr 6 '14 at 19:23
• @cheapeffectivedietpills Of course this can be handled properly, but you're still adding an exception to the escaping mechanism, and that could go wrong if you make a mistake. Supporting HTML entities is an entirely optional part of MathJax as you can do the same thing with LaTeX commands. It doesn't make much sense to debate this though as my opinion doesn't matter here, we'd need an SE developer to accurately judge the impact of this change. – user9733 Apr 6 '14 at 19:26
• possible duplicate of Duplicate banner breaks LaTeX – Asaf Karagila Apr 6 '14 at 19:31
• @AsafKaragila Yeah, let's close this as a duplicate of a post with status-completed; this will surely bring attention to the issue. – user127096 Apr 6 '14 at 19:35
• (1) It means that this is a bug report, and not a feature request; (2) okay, fine, it's not a duplicate per se, but it seems to be more of a follow up on the previous bug report. Even though it is a duplicate of this bug report which is closed a duplicate of my suggested duplicate; as well deeply connected to this thread. None of which were referenced in your post. – Asaf Karagila Apr 6 '14 at 19:40