aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-05-10 16:13:01 -0700
committerzotlabs <mike@macgirvin.com>2020-05-10 16:13:01 -0700
commitc656478230e0e5a4f3716e8ba227d9359961b00f (patch)
tree54381fac3c21457715262164f8887b10b6cbc6a8 /include/text.php
parent191e01e3ec4930916ea42927629a5e5d74d07a59 (diff)
downloadvolse-hubzilla-c656478230e0e5a4f3716e8ba227d9359961b00f.tar.gz
volse-hubzilla-c656478230e0e5a4f3716e8ba227d9359961b00f.tar.bz2
volse-hubzilla-c656478230e0e5a4f3716e8ba227d9359961b00f.zip
issue with quoted hashtags/mentions
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php13
1 files changed, 13 insertions, 0 deletions
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