Could you change the code blocks to retain the user's original input? The worst offender is when one uses unicode. Example: If I include the greek pi (π) in regular text like this, it displays properly @ render time even though it was converted to an HTML entity (like π).
However, if it is a code block, something still modifies my formatting/input and changes my code to use an entity too, but then, to compound the problem, because it is a code block, it doesn't get reprocessed back into a UTF-8 character, but remains as an HTML entity, like:
This pi (π) doesn't display correctly.
I would argue that because it is a code block, it should have >not< turned it into an HTML entity in the first place. Then it would display properly at page-render time. While it would be acceptable if it at least was 'round-trip safe' and displayed it correctly @ render time, it seems that it would be more correct or more 'ideal' to not touch the user's input in the 1st place in a code block.
Since it displays correctly in regular text, it should at least be possible to get it to display right in a code block, but no one would know that the author used the correct character to begin with.
Thanks...