That sounds interesting!
It does not solve this problem, but TeX code can now be uploaded - backslashes are not destroyed any more.
As intermediate functionality, I could support the upload of .tex-files. These could be reviewed and corrected online and then be downloaded again. Would that be OK?
The whole she-bang with comments inside the TeX code might take more time.
Would a simple read-only "ascii2json"-API would be sufficient?
Question is: how to markup the report?