template compatibility fixes for 5.3.6
clean up html syntax so that page will validate correctly