From c656478230e0e5a4f3716e8ba227d9359961b00f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 10 May 2020 16:13:01 -0700 Subject: issue with quoted hashtags/mentions --- include/text.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index a2e5ce37a..6873cc1c3 100644 --- a/include/text.php +++ b/include/text.php @@ -864,6 +864,11 @@ function get_tags($s) { $ret[] = $mtch; } } + if(preg_match_all('/([@#\!]\".*?\")/',$s,$match)) { + foreach($match[1] as $mtch) { + $ret[] = $mtch; + } + } // match bracket mentions @@ -2798,6 +2803,10 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) $basetag = substr($tag,7); $basetag = substr($basetag,0,-6); } + elseif((substr($tag,0,2) === '#"') && (substr($tag,-1,1) === '"')) { + $basetag = substr($tag,2); + $basetag = substr($basetag,0,-1); + } else $basetag = substr($tag,1); @@ -2880,6 +2889,10 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) $newname = substr($name,6); $newname = substr($newname,0,-6); } + elseif((substr($name,0,1) === '"') && (substr($name,-1,1) === '"')) { + $newname = substr($name,1); + $newname = substr($newname,0,-1); + } // select someone from this user's contacts by name -- cgit v1.2.3