Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a username that starts with a number is mentioned, fullname isn't displayed. #7755

Open
cyberjam opened this issue Jan 13, 2024 · 4 comments · May be fixed by #7761
Open

When a username that starts with a number is mentioned, fullname isn't displayed. #7755

cyberjam opened this issue Jan 13, 2024 · 4 comments · May be fixed by #7761
Assignees
Labels
Bug Report/Open Bug report/issue

Comments

@cyberjam
Copy link
Contributor

cyberjam commented Jan 13, 2024

Summary

When a username that starts with a number is mentioned, the fullname doesn't appear. Only @<username> is displayed.

Environment Information

  • Device Name: iPhone 11 / Pixel 3a
  • OS Version: iOS 17.0 / Android 14.0
  • Mattermost App Version: 2.11.0 (Build 497) / 2.12.0 (Build 501)
  • Mattermost Server Version: 8.1.7 (Build 7025434773) / 8.1.7 (Build 7025434773)

Steps to reproduce

Mention a username that starts with a number.

Expected behavior

When mentioning @123username that starts with a number, @fullname should be displayed.

Observed behavior (that appears unintentional)

image

Possible fixes

mattermost>commonmark.js>lib>inlines.js
mattermost>commonmark.js>dist>commonmark.js

  • AS-IS
    var reAtMention = /^@([a-z][a-z0-9._-]*)/i;
  • TO-BE
    var reAtMention = /^@([a-z0-9][a-z0-9._-]*)/i;
AS-IS TO-BE
image 스크린샷 2024-01-13 오후 11 31 01
````````````````````````````````
 
```````````````````````````````` example
This is an @123mention
.
<p>This is an <span data-mention-name="123mention" /></p>
AS-IS TO-BE
image image

If you need anything, just let me know ;)

@amyblais
Copy link
Member

@cyberjam Are you able to reproduce this issue on our community server https://community.mattermost.com/?

@cyberjam
Copy link
Contributor Author

cyberjam commented Jan 15, 2024

@amyblais Thanks for reply. I reproduced this issue on mattermost community server. It is same.

Before After
image image

@cyberjam cyberjam changed the title When a username that starts with a number is mentioned, @<username> is displayed. When a username that starts with a number is mentioned, fullname isn't displayed. Jan 15, 2024
@amyblais
Copy link
Member

Thanks, opened https://mattermost.atlassian.net/browse/MM-56555.

@amyblais amyblais added the Bug Report/Open Bug report/issue label Jan 15, 2024
@cyberjam
Copy link
Contributor Author

Thanks! If possible, I'd like to be assigned this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report/Open Bug report/issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants