Revert "clean up html garbage"

This reverts commit 7fab897b1581b8c13b3f904e1d5a23348a6b8a10.
simplify code