Nodebb: Rules and restrictions for selecting username

Created on 28 Nov 2017  路  9Comments  路  Source: NodeBB/NodeBB

  • NodeBB version: 1.7.0
  • NodeBB git hash: dbdc05404daeac7021b60f22f7c18588ca126cfd
  • Database type: mongo
  • Database version: 3.2.11

  • Exact steps to cause this issue:

Tagged one of our users with this username: _MILAD_

  • What you expected:

I expected to see user's name linked with his account page.

  • What happened instead:

I just saw his name only, the word is not linked with account page!

2017-11-28_165958

Why this happens? how can we solve this?
Do we have any rules and restrictions for selecting usernames?

needs more info

Most helpful comment

Looks like we may have to disallow use of _ in slugs, I've made the change in #6133, will merge if tests pass...

All 9 comments

Seems like markdown plugin is processing the text before the mentions plugin. Maybe increasing the priority of the filter:parse.post hook in mentions would fix this.

Might be related to the username... _MILAD_. Can you share the link to his account profile on your forum @mohammadhassan99 ?

@julianlam Yes of course: https://forum.sanatisharif.ir/user/_milad_

Does the mention work with @milad or @-milad?

@julianlam

2017-11-28_211855

Okay, thanks, I will try to reproduce on my end.

Looks like we may have to disallow use of _ in slugs, I've made the change in #6133, will merge if tests pass...

disallow use of _ in slugs

This restriction is just a workaround. Discourse allow underscore, so do you. string after @ should be handled out of markdown (or any markup language) context.

The development of logic to handle the @ sign followed by underscore requires more research than I can do at the moment. Feel free to try it out and submit a PR, but I'm not too familiar with building markdown-it plugins.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aStonedPenguin picture aStonedPenguin  路  4Comments

darKnight0037 picture darKnight0037  路  4Comments

AliCihan picture AliCihan  路  4Comments

BenLubar picture BenLubar  路  3Comments

julianlam picture julianlam  路  4Comments