Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Re: Removing ' ' from strings ?? Date: Thu, 16 Jan 2014 13:37:41 -0700 Lines: 24 Message-ID: References: <0.14085b2fab6b953fb903.20140115234423GMT.87bnzcolns.fsf@bsb.me.uk> <0.ae3d2a008e8309f72c9a.20140116161844GMT.87ob3blx23.fsf@bsb.me.uk> X-Trace: individual.net DF17I2CL8VptxApSxBtkiQq09u+D/VN1mBO9h5EGPr6TbQ7Ayb Cancel-Lock: sha1:K4iGd3QDZTK9xSlgDZRXGi8+GhM= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:22647 Denis said: >> textstr = option.text ; > > option.text may not be the same as option.innerHTML, especially if the > html contains entity codes. I suspect the issue is that the html entity > codes have been translated into some other encoding scheme (ie other than > html entity encoding) in the text string that you're getting back as the > value of option.text. Hi Denis: I ave simple text (with the inclusion of   codes, and MArtin's solution resolves everything nicely. IE* and Chrome react exactly the same. I tried 'innerHTML' for a few minutes, and came up with the long string of chars interspersed with   So, back to Martin's solution. Thanks to all ! -Mel