From bd48a016afeaa9aa6a67739fad9bda63814372f0 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 2 Nov 2011 21:07:17 -0700 Subject: [PATCH] fix for multiple consecutive @ tags --- include/text.php | 2 +- mod/item.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index 4726872ec..59fc15007 100644 --- a/include/text.php +++ b/include/text.php @@ -465,7 +465,7 @@ function get_tags($s) { // Match full names against @tags including the space between first and last // We will look these up afterward to see if they are full names or not recognisable. - if(preg_match_all('/(@[^ \x0D\x0A,:?]+ [^ \x0D\x0A,:?]+)([ \x0D\x0A,:?]|$)/',$s,$match)) { + if(preg_match_all('/(@[^ \x0D\x0A,:?]+ [^ \x0D\x0A@,:?]+)([ \x0D\x0A@,:?]|$)/',$s,$match)) { foreach($match[1] as $mtch) { if(strstr($mtch,"]")) { // we might be inside a bbcode color tag - leave it alone diff --git a/mod/item.php b/mod/item.php index 48bfb7751..a03a85775 100644 --- a/mod/item.php +++ b/mod/item.php @@ -378,6 +378,7 @@ function item_post(&$a) { if(count($tags)) { foreach($tags as $tag) { + if(isset($profile)) unset($profile); if(strpos($tag,'#') === 0) {