Problem/Motivation
If an user has spaces in their username and it is added in the form input field, the link that is created in the display page is formatted incorrectly and takes the user to a wrong page.
Username - John Doe
Current link format - https://www.drupal.org/u/John%20Doe
Expected link format - https://www.drupal.org/u/John-Doe
Steps to reproduce
1. Add any username in the Drupal.org username form field with spaces (eg. John Doe) and save the form.
2. Open the display page and click the Drupal.org username link, it will take the user to a wrong page.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork do_username-3416847
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3416847-drupal.org-profile-link
changes, plain diff MR !9
Comments
Comment #4
tyler36 commentedAttempt to fix issue.
- trim username of leading and trailign spaces.
- replace other spaces with '-'.
Test with database provider also included. This should allow extra edge cases to be added if required.
Comment #5
hussainwebEven though this MR is not merged, I have put in a different fix in #3464064: Usernames with Spaces do not work, adapted the test here, and credited you there. Thanks!