In IE when I insert text into a tag the newlines are ignored:
if (typeof div2.innerText == 'undefined') div2.innerHTML = value; else div2.innerText = value;
that worked for me.