{"action":"created","issue":{"url":"https://api.github.com/repos/R-J/MentionsPlus/issues/1","labels_url":"https://api.github.com/repos/R-J/MentionsPlus/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/R-J/MentionsPlus/issues/1/comments","events_url":"https://api.github.com/repos/R-J/MentionsPlus/issues/1/events","html_url":"https://github.com/R-J/MentionsPlus/issues/1","id":64325665,"number":1,"title":"Use a different regex for extracting mentions","user":{"login":"bleistivt","id":5205806,"avatar_url":"https://avatars.githubusercontent.com/u/5205806?v=3","gravatar_id":"","url":"https://api.github.com/users/bleistivt","html_url":"https://github.com/bleistivt","followers_url":"https://api.github.com/users/bleistivt/followers","following_url":"https://api.github.com/users/bleistivt/following{/other_user}","gists_url":"https://api.github.com/users/bleistivt/gists{/gist_id}","starred_url":"https://api.github.com/users/bleistivt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleistivt/subscriptions","organizations_url":"https://api.github.com/users/bleistivt/orgs","repos_url":"https://api.github.com/users/bleistivt/repos","events_url":"https://api.github.com/users/bleistivt/events{/privacy}","received_events_url":"https://api.github.com/users/bleistivt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-25T17:24:33Z","updated_at":"2015-03-29T21:35:44Z","closed_at":null,"body":"The mentions parser of the UmlautMentionsFormatter uses the username validation regex.\r\n\r\nThe problem with this is, that mentions may not work for users if the validation regex was changed to a less permissive one.\r\n\r\nFor example, some of my users come from an imported phpBB database that allowed spaces in usernames.\r\nI don't intend to allow them in vanilla, but if I don't change it to allow spaces, `\"user name\"` will not be mentioned.\r\n\r\nThis is also a problem with users from SSO plugins which circumvent the validation.\r\n\r\nI'd suggest just using `[^ ]` and `DELIMITER.?DELIMITER` for names without spaces.\r\n\r\nI'd also do a pull request, just wanted to hear your opinion first."},"comment":{"url":"https://api.github.com/repos/R-J/MentionsPlus/issues/comments/87484809","html_url":"https://github.com/R-J/MentionsPlus/issues/1#issuecomment-87484809","issue_url":"https://api.github.com/repos/R-J/MentionsPlus/issues/1","id":87484809,"user":{"login":"bleistivt","id":5205806,"avatar_url":"https://avatars.githubusercontent.com/u/5205806?v=3","gravatar_id":"","url":"https://api.github.com/users/bleistivt","html_url":"https://github.com/bleistivt","followers_url":"https://api.github.com/users/bleistivt/followers","following_url":"https://api.github.com/users/bleistivt/following{/other_user}","gists_url":"https://api.github.com/users/bleistivt/gists{/gist_id}","starred_url":"https://api.github.com/users/bleistivt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleistivt/subscriptions","organizations_url":"https://api.github.com/users/bleistivt/orgs","repos_url":"https://api.github.com/users/bleistivt/repos","events_url":"https://api.github.com/users/bleistivt/events{/privacy}","received_events_url":"https://api.github.com/users/bleistivt/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T21:35:44Z","updated_at":"2015-03-29T21:35:44Z","body":"Oops, you're right I didn't notice that. I don't think there is a better solution than the word boundary though, plus it's an unlikely user name.\r\n\r\nPutting the quoted one first makes it a little shorter:\r\n`@\"(.+?)\"|@(\\S+)\\b`\r\n\r\nI'll definitely fork it and report back once I tried it on my live site."}}