Line breaking code in IE8
===

This line seems to break my code in IE8, can anyone tell me why

    data=[];
    item=someElementWithTextInside
    //line below breaks it
    data.push({obj: item, text: item.innerHTML.replace(/^\s+/, "").replace(/\s+$/, ""))}; 
    //line above breaks

I've already tried looking at the innerHTML part of it, that function seems to work fine on my browser (and switching to innerText doesn't effect anything)