added check for <body> tag in PurifyEngine