Fix rendering diffs of changed text fields containing entities.
Review Request #8525 — Created Nov. 7, 2016 and submitted
Text fields in the Review Request Changed boxes nicely show diffs to help show what's changed. However, if these contain characters (such as double quotes) that need to be turned into entities (such as "), the region highlighting code will be thrown off, as it expects to be highlighting regions of plain text code. We do strip the tags, but we didn't unescape the entities. This change updates the code to first unescape the entities and then scan for the regions. This gives us regions that we can safely pass to the highlighter (which itself can already deal with entities).
Added a unit test that exhibited the same behavior found in production.
Verified it was fixed after decoding entities.