Write footer before closing html tag (closes #3702378) [applied]