I have a need to output formatted xhtml content. I am currently calling ob_start(‘ob_tidyhandler’) and ob_end_flush() appropriately, but the output is not what I expected.
Current output…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title>Flash Cards</title>
</head>
<body>
<p>Hello world!</p>
</body>
</html>
Expected output…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title>Flash Cards</title>
</head>
<body>
<p>Hello world!</p>
</body>
</html>
Please note, this was output from three different methods: render_header, render_content (the hello world line) and render_footer.
What do I need to do to make this format correctly?