Mentioning User ending with Underscore: FAIL
-
Would that even work? Don't group mentions just expand into user mentions anyway?
Filed under: INB4 facts are a to
-
Hey, it doesn't have to work. As long as our egos feel validated...
-
>We should resolve this issue @eviltrout either by disallowing trailing _ or otherwise.
disallowing trailing _
Filed under: also, raw
Bwahahaha, what an idiot.
-
Regex, baby!
@@ -7,7 +7,7 @@ Discourse.Dialect.inlineRegexp({ start: '@', // NOTE: we really should be using SiteSettings here, but it loads later in process // also, if we do, we must ensure serverside version works as well - matcher: /^(@[A-Za-z0-9][A-Za-z0-9_\.\-]{0,40}[A-Za-z0-9])/, + matcher: /^(@[A-Za-z0-9][A-Za-z0-9_\.\-]{0,40}[A-Za-z0-9\_])/, wordBoundary: true, emitter: function(matches) {
Reading this, it looks like possibly a period or a dash is a valid character in a user name, but if yours ends with one, you won't be mentioned. I get that they're trying to ignore punctuation, but, uh...if those are legal characters...
I wonder if they even noticed that the same issue is still there. Did they decide that no one else was complaining, so who cares? That's a problem for future discodev?
-
Also, <3 that comment...
-
if those are legal characters...
Another instance of "just because our software lets you do it, doesn't mean we support it and you're doing it wrong".
-
Reading this, it looks like possibly a period or a dash is a valid character in a user name, but if yours ends with one, you won't be mentioned.
So now we won't be able to do underscores around user mentions right? @boomzilla
-
I got a reply notification, which I think overrides mentions. Let's try this: @dkf
Any mention here?
-
Did you get a mention for this post?
-
I don't know; I usually ignore blue notifications entirely. (But it seems that both were generated. Because Discourse.)
-
-
I don't know; I usually ignore blue notifications entirely. (But it seems that both were generated. Because Discourse.)
Maybe you should post on meta.derp.
Too soon?
-
Maybe you should post on meta.derp.
I dislike being among that bunch of nitwits so much that I've never been banned from participating there.
-
Do we even have that fix yet?
-
Regex, baby!
Better idea. Install a code enforcement program that will reject any check-ins that match the following regex:
/[/].*[/]/
-
No
-
I get that they're trying to ignore punctuation, but, uh...if those are legal characters...
That does induce a certain ambiguity though. If I type@name.
, am I trying to mention@name
at the end of a sentence, or am I trying to mention@name.
? In practice the former will be far more common so excluding a trailing.
is the correct decision here.Of course a better way to do it would be to check if
name
was a valid user, and if not, to try again withname.
. And have some way for the raw post to explicitly indicate that it's mentioning@name.
in the case that bothname
andname.
are valid users. Perhaps mentions would have done better to use the format@name@
so that it wouldn't have to guess where the ending was.(I'm assuming that all this is for the purpose of baking the post, since the autocomplete popup works with the underscore people, it just doesn't get baked properly. Since the autocomplete works on partial names anyway, we'd definitely want to strip any dodgy characters off the end in that case.)
-
it just doesn't get baked properly
That's Discourse through and through: half-baked all the way.
-
Of course a better way to do it would be to check if name was a valid user, and if not, to try again with name.. And have some way for the raw post to explicitly indicate that it's mentioning @name. in the case that both name and name. are valid users. Perhaps mentions would have done better to use the format @name@ so that it wouldn't have to guess where the ending was.
Yep. The bottom line is that apparently there are still potential users whom you can't mention. This issue is a great example of lazy discobugfixing.
-
Of course a better way [...]
No, a better way is to use the same regex as you're using for initial name validation.
It's fine to disallow trailing dots, dashes, whatever, but don't allow user registration with those names either. Doing that kind of on-mention magic is TR
-
The best way is to do something BBcode-like
[mention]name_[/mention].
No ambiguity whatsoever! And it's autocomplete-friendly, too, just have a mention button on the composer bar that lets you select a name and drops in the BBcode for you.
Filed Under: TOO_SIMPLE_WONT_IMPLEMENT_CLOSED
-
@"name. of-person_".
-
No, a better way is to use the same regex as you're using for initial name validation.
If only someone would invent a way to re-use the same code path at different points. Almost like you could split your code path up into different groupings of mini-paths, rather than just having the One Path. It would sure seem a lot more functional...
-
Heh. We already had one situation with Discourse config files, I think, where quotes made Jeff mad because someone else was Doing It Wrong. I forget the details, though.
-
If you have a (double?) quotation mark in your SMTP password, the config parser will puke on it and your forum won't be able to send any e-mails. The official fix for it was, "change your SMTP password".
CBA to actually link the thread, b/c disco search + meta.d toxic hellstew.
-
If only someone would invent a way to re-use the same code path at different points. Almost like you could split your code path up into different groupings of mini-paths, rather than just having the One Path. It would sure seem a lot more functional...
They probably couldn't find an inefficient-enough third-party library or two to re-implement classes and functions.
-
@Scarlet_Manuka said:
Of course a better way [...]
No, a better way is to use the same regex as you're using for initial name validation.
That is also a better way, yes, though it doesn't solve the same problem (where we want to allow user registration with trailing punctuation). I'm pretty sure this forum could come up with dozens of better ways than what has been implemented.The best way is to do something BBcode-like
I agree, that's why I suggested the@name@
format.If only someone would invent a way to re-use the same code path at different points.
If anyone does invent such an amazing thing, be sure to let @SpectateSwamp know about it as well.If you have a (double?) quotation mark in your SMTP password, the config parser will puke on it and your forum won't be able to send any e-mails. The official fix for it was, "change your SMTP password".
They probably couldn't find an inefficient-enough third-party library or two to re-implement classes and functions.
Who's got some free time? I'm sure we could come up with something.
-
So, status update. As of this post I have four mentions to my name - two real mentions from before the discoregression, and two fake mentions from after the discoMD5pocalypse.
https://what.thedailywtf.com/users/lb_/activity/mentions
It has been determined that in order to mention people with an underscore you must do something along these lines:
<!--`LB_`-->@5bcc8b3b0b4e6ea55b2198c43e172dae
Demonstration:
@ac14135d35f6e49600097fa739a4da2bIf you add the proper CSS class it even looks real:
@ac14135d35f6e49600097fa739a4da2b - try clicking it!<!--`LB_`--><a class="mention">@5bcc8b3b0b4e6ea55b2198c43e172dae</a>
You may wish to bookmark this post for future reference.
-
Fuckin' Discomentions… How Do They Work?
-
-
TIL we have such an emoji as that.
-
-
Blakeyrat creates the best emotes.
-
Blakeyrat creates the best emotes.