From ded89ef6a31e8cfcc56aa96b75be8ae6ab58dd7c Mon Sep 17 00:00:00 2001
From: Michael Hamann <michael@content-space.de>
Date: Mon, 23 May 2011 10:32:00 +0200
Subject: [PATCH] Hopefully finally fixed the subscription user regex

Users with names like foo.bar still didn't receive the mail when user
foo edited the page. Now the two possibilities (space and end of line)
are tested instead of just a word boundary.
---
 inc/subscription.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/subscription.php b/inc/subscription.php
index 669d6137d..c94f17ad0 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -279,7 +279,7 @@ function subscription_addresslist(&$data){
     $pres = array('style' => 'every', 'escaped' => true);
     if (!$self && isset($_SERVER['REMOTE_USER'])) {
         $pres['user'] = '((?!' . preg_quote_cb($_SERVER['REMOTE_USER']) .
-                        '\b)\S+)';
+                        '(?: |$))\S+)';
     }
     $subs = subscription_find($id, $pres);
     $emails = array();
-- 
GitLab