Problem with newline between DOCTYPE and root element when using .html()

Problem with newline between DOCTYPE and root element when using .html()

Three files are used to show this problem (see attachment jqproblem.zip ).
The core code is as follows, and jquery (1.4.2) is not behaving as expected for the loldiv.html text, which is a legal xhtml fragment.

var urli="lildiv.html"; //has no linebreak between DOCTYPE and document element (no fail)
var urlo="loldiv.html"; //has linebreak between DOCTYPE and document element  (fails)
$.get(urli,function(data){ loadPanel(data,"div.i"); })    
$.get(urlo,function(data){ loadPanel(data,"div.o"); })    
function loadPanel(data,point) { $(point).append($(data).html()); }

*(I know this should be marked as a problem - but the ui - change topic type - isn't working for me.. i re-posted this as a problem. Mods - sorry.)
    • Topic Participants

    • ben