In IE when I insert text into a tag the newlines are ignored:
Does this work in IE?
document.getElementById("putItHere") .appendChild(document.createTextNode("first line\nsecond line"));
I tested it with Firefox and it works. :-)