This is quite mysterious. I have several list items like this:
HTML Code:
I am looping through them all trying to get the text inside each list item for a comparison with a string from elsewhere.
Code Javascript:
var coresubmenu = document.getElementById('core').getElementsByTagName('li');
for (var i = 0; i < coresubmenu.length; i++) {
  coresubmenu[i].onclick = function() {
    if (this.firstChild.nodeValue == 'Private') {
      // fail
    alert(this.firstChild.nodeValue.length); // alerts 8
IE alerts one more than the actual length in all cases. Google hasn't brought anything up for me on this one - any ideas?