aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Comments
diff options
context:
space:
mode:
authorMario Danic <mario@lovelyhq.com>2018-06-08 10:21:19 +0200
committerMario Danic <mario@lovelyhq.com>2018-06-08 10:21:19 +0200
commit47769d2640be7f49d9db154a161e6c9d84928ee3 (patch)
treeb4ea9264dd8cfb45df7b33e8f49ff35acc38fae5 /lib/private/Comments
parentdc7beda308716183f2bcc67d63f7786a90eaa63c (diff)
downloadnextcloud-server-47769d2640be7f49d9db154a161e6c9d84928ee3.tar.gz
nextcloud-server-47769d2640be7f49d9db154a161e6c9d84928ee3.zip
New regex to match mentions
Signed-off-by: Mario Danic <mario@lovelyhq.com>
Diffstat (limited to 'lib/private/Comments')
-rw-r--r--lib/private/Comments/Comment.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php
index 630844c444a..94c43be622b 100644
--- a/lib/private/Comments/Comment.php
+++ b/lib/private/Comments/Comment.php
@@ -225,7 +225,7 @@ class Comment implements IComment {
*
*/
public function getMentions() {
- $ok = preg_match_all('/\B(^@\w+|(?<=\s)@\w+)/i', $this->getMessage(), $mentions);
+ $ok = preg_match_all("/\B(?<![^a-z0-9_\-@\.\'\s])@[a-z0-9_\-@\.\']+/i", $this->getMessage(), $mentions);
if(!$ok || !isset($mentions[0]) || !is_array($mentions[0])) {
return [];
}