Fix JSON parse errors in the HTML view when diffs contain backslashes