From: Stephen Boyd Date: Fri, 20 Nov 2009 01:00:16 GMT Subject: Re: [PATCH 2/2] gitweb.js: use unicode encoding for nbsp instead of html entity Message-ID: <4B05EA20.1080706@gmail.com> In-Reply-To: <200911200000.41658.jnareb@gmail.com> Jakub Narebski wrote: > On Thu, 19 Nov 2009, Stephen Boyd wrote >> It seems that in Firefox-3.5 inserting nbsp with javascript inserts the >> literal nbsp; instead of a space. Fix this by inserting the unicode >> representation for nbsp instead. > > Errr... why are you avoiding writing   or " " here? Sorry, this part was rushed out. I can fix it in a resend if this is actually the right thing to do. > Well, since I moved from elem.innerHTML (which is non-standard, and > does not work for some browsers in strict XHTML mode) to setting > elem.firstChild.data (which assumes that firstChild exists and it > is a text node) I have had damned *intermittent* bugs where sometimes > ' ' would be shown literally, and sometimes this entity would > be correctly rendered. > > I suspect this is either bug in Firefox, or unspecified part of DOM. > > As we need this only for progress report, I am not against this change, > if it doesn't make it worse in other browsers. I've tested this in Opera-10.10 now and it looks good. I'll try to get my hands on a Windows machine to test with IE, but no promises.