open-build-service
open-build-service copied to clipboard
Impossible to reference users with "+" in their username
Issue Description
If a user has the symbol "+", when being referenced by @, then the link is incorrect. Example:
It's impossible to reference user "anag+factory", and the link is created only for @anag. This is a parsing error.
Expected Result
A link to the proper user is created (and hopefully, a email notifications are sent to that user, too).
How to Reproduce
- Go to any comment field.
- Try to create a reference to "anag+factory".
- Save the comment.
- The link is created to user "anag" instead.
Example: https://build.opensuse.org/request/show/1145598#comment-1887503
Further Information
- A link to an OBS instance showing the issue: https://build.opensuse.org/request/show/1145598#comment-1887503
FWIW I'm happy as workaround to rename my user to anag_factory or ana_factory ;)
FWIW I'm happy as workaround to rename my user to anag_factory or ana_factory ;)
That's hardly a solution, instead the code for generating those links is right here, it just needs to be updated with better regex https://github.com/openSUSE/open-build-service/blob/master/src%2Fapi%2Flib%2Fobsapi%2Fmarkdown_renderer.rb#L16
FWIW I'm happy as workaround to rename my user to anag_factory or ana_factory ;)
That's hardly a solution, instead the code for generating those links is right here, it just needs to be updated with better regex https://github.com/openSUSE/open-build-service/blob/master/src%2Fapi%2Flib%2Fobsapi%2Fmarkdown_renderer.rb#L16
I guess the emoticon wasn't marking enough this was a joke. But in any case, I'm not sure the plus sign are common in the usernames and the fact I ended up with a '+' is because IDP doesn't allow to rename users and other many things.