Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

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

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

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

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: hartmut[at]php.net
[Submitted to the original trac issue database at 5.25pm, Tuesday, 12th October 2010]

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 ):

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 8.05am, Wednesday, 13th October 2010]

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.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 8.06am, Wednesday, 13th October 2010]

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant