JQuery is adding the carrige return and new line characters to the beginning of any newly created JQuery elements in IE7 and IE8. What is going on?
Using JQuery version 1.9.1 with the following:
var myDiv = $('<div>');
alert('myDiv[0].outerHTML="' + myDiv[0].outerHTML + '"');
results in the output when executed in IE8 or IE7:
"
myDiv[0].outerHTML=<div></div>"
You can repro in this jsbin sample, but remember to use IE8 or IE7 mode.