is html. not javascript! Does IE do this any differently than firefox?
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" " http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title> nbsp; </title> <script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript"> $(function(){ var x = " " alert(x.length) var y = "\u00a0" alert(y.length) alert($('span').text().length) }); </script> </head> <body> <span> </span> </body> </html>