In case you are fixing just Word export, you should only change code for that case and not for all exports, because this way you break other exports. Also code should not be just commented out, but rather removed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have checked and all the other format downloads are working fine after this change in code was made.
Moved to Patches.
In case you are fixing just Word export, you should only change code for that case and not for all exports, because this way you break other exports. Also code should not be just commented out, but rather removed.
New patch
Still you are changing generic code path, the fix should IMHO go to libraries/export/htmlword.php