6
$\begingroup$

I'm seeing some TeX formulas such as $i<k-1$ rendered with &lt in HTML where there should probably have been &lt; with a terminating semicolon. For example from this question:

Screenshot of rendering

(Note: the linked question has since been edited to put the inequality outside TeX, working around the bug, but the formula at the beginning of this question still exhibits the bug).

Firefox, both Windows and Linux. (Screenshot is from Iceweasel 2.5.16 on Debian).

The problem does not appear to happen in preview -- only on the initial load of a page.

Bump: Any news? Davide's answer suggests that this should be just a matter of typo fixing.

$\endgroup$
2
$\begingroup$

There was in fact a missing ; when encoding < - this will be fixed with the next deploy.

$\endgroup$
  • $\begingroup$ When's the next deploy? The bug is still there. $\endgroup$ – Henning Makholm May 1 '12 at 12:36
  • $\begingroup$ The fix has been deployed - do you have an example of where it is still broken? $\endgroup$ – Geoff Dalgas May 1 '12 at 14:25
  • $\begingroup$ Right in the first line of this very meta question. To double check, the raw HTML I get from http://meta.math.stackexchange.com/questions/3973/wrong with wget includes the passage I'm seeing some TeX formulas such as $i&ltk-1$ rendered... $\endgroup$ – Henning Makholm May 1 '12 at 16:48
  • $\begingroup$ I think the modification is made at the point the question is saved, not when it is delivered to you from the server. So any existing questions with this problem will continue to have that problem. You might try editing your question to put back a < and see if the new copy gets the right HTML sent back. $\endgroup$ – Davide Cervone May 5 '12 at 16:51
  • $\begingroup$ @Davide: You're right; that fixed it. $\endgroup$ – Henning Makholm May 7 '12 at 11:16
6
$\begingroup$

I suspect that this has to do with the changes made to bring the MathJax-in-Markdown code for posts in line with that used in the previews (as described here). That code includes a substitution of &lt; for < in the mathematics, but it appears that someone left off the trailing ; in the substitution. I have checked that the preview code is correct, but I don't have access to the Markdown back end on the server, so I can't check that (and that is where the problem likely lies).

Note that whether this works or not is browser-dependent (some process the entity without the final semi-colon). I think that if the original < were followed by a space, most browsers would handle it properly. But of course, the code needs to be fixed.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .