Messed-up display of code containing $ in the question list In the question list http://mathematica.stackexchange.com/questions/tagged/evaluation, I saw the question Pre and Post in a Block[] displaying incorrectly. The question displays correctly on the question page itself. That question's body is: Why does Block[{$Pre = ( 1 + #) &}, 1]
produce 1 while

Block[{$PreRead = Print["hi"]}, 1] produces "hi" 1 ? In the Block block, shouldn't the expression have it's Pre evaluation as well?  It shows up in the list as: The HTML of the excerpt in the question list is  <h3><a href="/questions/13501/pre-and-post-in-a-block" class="question-hyperlink">Pre and Post in a Block[]</a></h3> <div class="excerpt"> Why does Block[{$Pre = ( 1 + #) &amp;}, 1]

produce 1 while

Block[{$PreRead = Print["hi"]}, 1] produces "hi" 1 ? In the Block block, shouldn't the expression have it's Pre evaluation as well? </div>  which is what you expect (no weird box). It seems that Mathjax is misinterpreting the $ signs in the code and trying to render it as an equation.

This bug probably occurs on any site that has Mathjax enabled, but Mathematica.SE is most likely to see the issue since it uses both $math$ and code containing \$ signs.

Similar to these issues (but distinct, since both are fixed):

-

We strip out html tags when building a post's summary, so the normally MathJax suppressing <code> tags aren't there.