I'm building a custom Wordpress theme and I've just come across a bizarre issue where the_content() seems to be printing out the page content wrapped in the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><body> ... </body></html>
This is an issue because I've now got second instances of DOCTYPE, html and body tags appearing in my page code. I've attached screenshots below showing the code and the output.
I would appreciate any help as to why this may be happening and how I can go about solving the problem. I've disabled all plugins so that doesn't seem to be the problem.
Edit: The content was copy and pasted directly from another webpage and it has been suggested that this was the source of the DOCTYPE and tags. I have removed all this content and manually inputted some text and the tags still exist as shown in the screenshot below.