Use nodeValue, it does not create html entities like &nbsp;