View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025698 | mantisbt | mentions | public | 2019-04-17 11:14 | 2022-02-13 22:39 |
Reporter | Maurycy | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | confirmed | Resolution | open | ||
Product Version | 2.19.0 | ||||
Summary | 0025698: Mentions does not work when user login is an email | ||||
Description | In our organization all logins are oganizational email accounts. Also in Mantis we use emails as logins (usernames). Unfortunately that causes that mentioning does not work, because it does not include char | ||||
Additional Information | Currently the pattern matching for mentions looks like that:
My proposition is to extend it like this:
I've tested this pattern and it seems to work, see: https://regex101.com/r/gkitVn/1 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
The updated regex allows any number of |
|
True... we could change it from |
|
Attached patch file that allows for single mention_api.php.patch (771 bytes)
Index: core/mention_api.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/mention_api.php (date 1555667913000) +++ core/mention_api.php (date 1555668521000) @@ -73,8 +73,8 @@ # Negative lookbehind to ensure we don't match multiple tags . '(?<!' . $t_quoted_tag . ')' . $t_quoted_tag . ')' - # any word char, dash or period, must end with word char - . '([\w\-.]*[\w])' + # any word char, dash, period or single @ char, must end with word char + . '([\w\-.]*@?[\w\-.]*[\w])' # Lookforward to ensure next char is not a valid mention char or # the end of the string, or the mention tag . '(?=[^\w@]|$)' |
|