Hi, I have the same problem, I already did what was suggested in the documentation:
1. Go to Quick-access menu > Security > Security settings.
2. Tick the Disable consistent cleaning setting.
3. Click Save changes.
In addition to this I also added this to my config.php file
$CFG->disable_forced_html_download = 1;
but it still doesn't work, it appears blank and downloads the index.html
Any suggestions?? or will this functionality no longer work on totara 19