If formatOutput is set to TRUE, then the regexes in getContent() will not match the newlines, and the output will include html, body and meta tags. Introduce a few new tests to ensure the output is correct, and fix the regex.