DWR

preserve multiple spaces and tabs when setting/getting texts with dwr.util.*

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Normal Normal
  • Resolution: Unresolved
  • Affects Version/s: 1.0, 1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 2.0.rc1, 2.0.rc2, 2.0.rc3, 2.0.rc4, 2.0.rc5, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 3.0.M1, 3.0.RC1
  • Fix Version/s: 4.0
  • Component/s: Util
  • Documentation Required:
    Yes
  • Description:
    Hide
    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 &nbsp;'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
    Show
    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 &nbsp;'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

Activity

There are no comments yet on this issue.

People

Dates

  • Created:
    18/Dec/09 7:03 AM
    Updated:
    18/Dec/09 7:03 AM