Yes, David is right, this is a HTML problem as there is no
standard way to preserve multiple spaces or tabs when
converting text back and forth to/from HTML. But I'll add
looking at this as a post-3.0 activity.
David Marginian wrote:
> If you would take the time to create a simple html test you will see
> that this has nothing to do with DWR:
>
> <select id="test">
> <option>T est</option>
> </select>
>
> To avoid this problem I suppose you can replace the spaces
> with 's
> - that works. Not sure of any other solutions.
>
> si jax wrote:
> > Hello, I've noticed that when I add options to a select box using
> > addOptions multiple spaces internal to a string e.g. "As is" are
> > compressed to a single space e.g. "As is". This behaviour occurs on
> > the examples on the project homepage as well as in my project. I've
> > traced it through the java source code of dwr and it appears the
> > spaces are intact at the point it is handed over to
> javascript however
> > I am struggling to see what happens beyond this point. If
> anyone has
> > an tips on how to prevent this occurring it would be much
> appreciated.
> > Thanks
> > Simon
From mailing list:
Yes, David is right, this is a HTML problem as there is no
standard way to preserve multiple spaces or tabs when
converting text back and forth to/from HTML. But I'll add
looking at this as a post-3.0 activity.
David Marginian wrote:
> If you would take the time to create a simple html test you will see
> that this has nothing to do with DWR:
>
> <select id="test">
> <option>T est</option>
> </select>
>
> To avoid this problem I suppose you can replace the spaces
> with 's
> - that works. Not sure of any other solutions.
>
> si jax wrote:
> > Hello, I've noticed that when I add options to a select box using
> > addOptions multiple spaces internal to a string e.g. "As is" are
> > compressed to a single space e.g. "As is". This behaviour occurs on
> > the examples on the project homepage as well as in my project. I've
> > traced it through the java source code of dwr and it appears the
> > spaces are intact at the point it is handed over to
> javascript however
> > I am struggling to see what happens beyond this point. If
> anyone has
> > an tips on how to prevent this occurring it would be much
> appreciated.
> > Thanks
> > Simon