Question: I've just posted [an answer that involved some HTML](https://stackoverflow.com/questions/1093751/can-i-replace-20-with-nbsp-in-urls-that-have-spaces/1093769#1093769), which I indented by four spaces.

```
<a>http://some/url/with&nbsp;nbsp/</a>

```

compare to the original input I made:

```
<a>http://some/url/with&nbsp;nbsp/</a>
```

It seems as though `&nbsp;` gets replaced by an actual non-breaking space within a code section in the final output. I *think* this was not always the case (can someone confirm?), and it generally contradicts the meaning of a code section.

This is also inconsistent with the way text within backticks is treated. Now I know I could circumvent that by using `&amp;nbsp;`, but I'm *very* hesitant of this double encoding of source code.

Is it a bug?

Answer: 
This appears fixed, at least to me, in the later prettify.js we've deployed.
If you check the source of the page, the `&nbsp;` is written as `&amp;nbsp;`, so the double-decoding is happening on the client, not the server. That's pretty interesting.

It's a bug in the code formatter itself. Isn't that a component written externally to SO?