Modify

Opened 8 years ago

Closed 8 years ago

#12499 closed enhancement (fixed)

Detect and fix names with multiple spaces

Reported by: naoliv Owned by: team
Priority: normal Milestone: 16.02
Component: Core validator Version:
Keywords: space Cc:

Description (last modified by naoliv)

Sometimes I see objects with multiple spaces at the middle of their names.
For example, something like name=Foo␣␣Bar (two spaces between the words)

Could JOSM detect and remove them, please?

Attachments (0)

Change History (8)

comment:1 by mdk, 8 years ago

Sorry - missunderstanding. You want to replace repeated spaces in a word. This sound useful.

Will this not automatically done by XMLparser?

Last edited 8 years ago by mdk (previous) (diff)

comment:2 by naoliv, 8 years ago

Exactly, repeated and sequential whitespaces (ie, name=A␣␣B␣␣␣C)
And I don't know about XMLparser.

comment:3 by mdk, 8 years ago

And I don't know about XMLparser.

The default behavior of a XML parser is replacing all whitespace sequences (space, tab, cr, ...) by a single space. If you want to preserve multiple whitespaces, you need a CDATA block or some parsers allow a special mode to prevent this behavior.

On upload (and parsing on the server) there is a good chance that this is automatically "correctd".

Are you able to upload a name with multiple sequential whitespaces?

comment:4 by naoliv, 8 years ago

I can't create and upload it, but I see data in OSM with multiple spaces.
If I download one area with objects like this I would like to have them detected and fixed.

Sometimes I am able to indirectly locate them because JOSM detects similar names. For example, name=Street␣A␣B␣C and name=Street␣A␣␣B␣C.

So what I would like to have is similar to what the validator already does when a value starts or ends with a whitespace: it gives a warning and offers to fix it.

Last edited 8 years ago by naoliv (previous) (diff)

comment:5 by naoliv, 8 years ago

Description: modified (diff)

comment:6 by Don-vip, 8 years ago

Keywords: space added
Milestone: 16.02

comment:7 by Don-vip, 8 years ago

We already have part of the solution since r6699 :)

comment:8 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 9744/josm:

fix #12499 - detect and fix multiple spaces in tag values

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.