You are reading a single comment by @dancing james and its replies. Click here to read the full conversation.
  • Ah, I see.

    Yes, that won't work.

    Hyperlinking of usernames and automatic "mentions" are driven by Twitter's convention on what is a username.

    https://support.twitter.com/articles/101299#

    Twitter only allows the following in usernames:

    • alphanumeric characters (letters A-Z, numbers 0-9)
    • underscores
    • 15 characters or shorter

    We already break the rules a little, we allow up to 40 characters. And we also allow unicode to work too.

    But... if a username contains anything that is going to be escaped as a HTML entity, i.e. & > or < ... then the username matcher is only going to find the bits up to the ampersand... meaning it actually finds @b and as there is no user called "b", it thinks there is no match.

    I'm happy to let anyone choose whatever username they want, but some will limit functionality.

About