removes foot since that can have javascript in it
added support for IE7