Page MenuHomePhabricator

Stop all object mentions from matching after "@"
ClosedPublic

Authored by epriestley on Sep 29 2015, 11:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 2:51 AM
Unknown Object (File)
Sun, Apr 7, 3:42 PM
Unknown Object (File)
Apr 1 2024, 7:19 PM
Unknown Object (File)
Apr 1 2024, 6:52 PM
Unknown Object (File)
Apr 1 2024, 7:59 AM
Unknown Object (File)
Mar 5 2024, 6:55 AM
Unknown Object (File)
Mar 4 2024, 4:32 PM
Unknown Object (File)
Mar 4 2024, 4:32 PM
Subscribers
None

Details

Summary

Fixes T9479. Currently, @aaaaaaaa may try to match as a commit hash, and @C123456 may try to match as a Countdown reference. These should only match as user mentions.

Prevent object mention rules from matching after @. We already prevent them after - and #, and already prevented the username rule after @ (i.e., preventing @@user).

Test Plan

Created some "interesting" users locally and @mentioned them:

Screen Shot 2015-09-29 at 4.08.02 AM.png (582×556 px, 46 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Stop all object mentions from matching after "@".
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

Slightly more correct patch: [#-@] is a character range which includes more characters than intended.

Use [#@-] instead (which is #, @ and - only).

  • Add test coverage for the commit reference use case.
  • Minor consistency tweak to comment.
chad edited edge metadata.
This revision is now accepted and ready to land.Sep 29 2015, 1:42 PM
This revision was automatically updated to reflect the committed changes.