aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorAlexandre Hannud Abdo <abdo@member.fsf.org>2015-02-13 06:54:49 -0200
committerAlexandre Hannud Abdo <abdo@member.fsf.org>2015-02-13 07:10:29 -0200
commit8696795ce69ee50c7a4e63f5a7e740de466f5df6 (patch)
treef7ee602d24e6ba3291aa1c78a2f509ea847e50a9 /include/items.php
parent4b513d3322e03ed59e796ca60d09ee1d26cc50fb (diff)
downloadvolse-hubzilla-8696795ce69ee50c7a4e63f5a7e740de466f5df6.tar.gz
volse-hubzilla-8696795ce69ee50c7a4e63f5a7e740de466f5df6.tar.bz2
volse-hubzilla-8696795ce69ee50c7a4e63f5a7e740de466f5df6.zip
Fixes tag delivery regex for when multiple tags are present
Previous regex would cause matches to span several tags when present, thus never recognizing the mention.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 717a4bf71..18ce149ed 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2861,7 +2861,7 @@ function tag_deliver($uid,$item_id) {
if(preg_match($pattern,$body,$matches))
$tagged = true;
- $pattern = '/@\!?\[zrl\=(.*?)\](.*?)\+\[\/zrl\]/';
+ $pattern = '/@\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\+\[\/zrl\]/';
if(preg_match_all($pattern,$body,$matches,PREG_SET_ORDER)) {
$max_forums = get_config('system','max_tagged_forums');
@@ -3022,7 +3022,7 @@ function tgroup_check($uid,$item) {
// $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'] . '+','/') . '\[\/zrl\]/';
- $pattern = '/@\!?\[zrl\=(.*?)\](.*?)\+\[\/zrl\]/';
+ $pattern = '/@\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\+\[\/zrl\]/';
$found = false;