While editing this response, I found a bug in the character escaping code. It is currently possible to write an & using &, but there is no way to specify characters using the numerical code in a code block, which is what the OP at the linked answer wanted. E.g.:


These should both display the same thing (the code &nbsp;) but neither of them displays correctly. However, &amp;nbsp; and &nbsp&#59; do both work when not in a code block. This is the same code as above, but in a <pre> block (shows that it doesn't work in inline code either):


(Should appear the same as the first block)


This is specific to code blocks, and a side effect of Google Prettify client-side JavaScript syntax highlighting.

Disable JavaScript and you'll find this works..

update: appears fixed with the latest prettify.js we've deployed.

  • Yeah, but disable Javascript and you straight away lose voting, comments, flagging, and myriad other important parts of the site as well! – a_m0d Aug 9 '09 at 23:35
  • 1
    regardless, it's an issue with prettify.js and not us – Jeff Atwood Aug 10 '09 at 0:01

For those without a high enough arbitrary number. Text indented four spaces:


Looks like none of these work.

Compare with <pre> block.

` `
` ;`
  • Alrighty then, PRE blocking it is. – random Aug 9 '09 at 1:44

You must log in to answer this question.

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