Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3285 closed defect (invalid)

Can't urlencode blank in user name using '+'

Reported by: hartmut@… Owned by: Tom Hughes
Priority: trivial Milestone:
Component: website Version:
Keywords: Cc:

Description

I was 'clever' enough to use my full name as Osm user name, first and last name separated by a blank ("Hartmut Holzgraefe").

Encoding the blank as %20

http://www.openstreetmap.org/user/Hartmut%20Holzgraefe

or using a verbatim blank (which my browser probably converts to %20 before sending the HTTP request)

http://www.openstreetmap.org/user/Hartmut%20Holzgraefe

i get to my user page just fine, but when using the plus sign (which is also a valid URL encoding for a blank)

http://www.openstreetmap.org/user/Hartmut+Holzgraefe

i get a "no such user" response.

Not much of a problem, but a bit annoying, esp. as the

{{Username|Hartmut Holzgraefe}}

wiki template uses the '+' encoding ...

(PS: trac not preserving line breaks in bug descriptions sucks ):

Change History (2)

comment:1 Changed 9 years ago by Tom Hughes

Resolution: invalid
Status: newclosed

It's not valid to use a plus sign in that way in the path part of the URL. Plus only means space in the query string - you have to use %20 for spaces in the path.

In fact the current URL standard (RFC 1738) doesn't seem to mention plus encoding at all - the earlier one (RFC 1630) did and said:

Within the query string, the plus sign is reserved as shorthand notation for a space. Therefore, real plus signs must be encoded. This method was used to make query URIs easier to pass in systems which did not allow spaces.

BTW use and to bracket any text you want to appear exactly as is in a trac ticket.

comment:2 Changed 9 years ago by Tom Hughes

Of course it eat those markers... They should be "{ { {" and "} } }" but without the spaces.

Note: See TracTickets for help on using tickets.