Most examples I find online show how to remove whitespace - but in my case I need to keep it.. I have
html = \"I can flip this whole thing with one hand\\n
The html parser seems to only keeps whitespace if the content you are parsing is in a <pre> tag -- in my case, the pre tag was removed. Adding
html = "<pre>" + html + "</pre>"
preserved the whitespace.