fixed escaping of <head> and </body> tags