From d7aaff459f7a7fc58568bc2cb58c1aa22061bfb4 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 12 Apr 2014 16:58:19 -0700 Subject: let normal hashtags be quoted strings also --- mod/item.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index e263867ae..e88f9a2a3 100644 --- a/mod/item.php +++ b/mod/item.php @@ -922,8 +922,16 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) { $replaced = true; } if(! $replaced) { + //base tag has the tags name only - $basetag = str_replace('_',' ',substr($tag,1)); + + if((substr($tag,0,7) === '#"') && (substr($tag,-6,6) === '"')) { + $basetag = substr($tag,7); + $basetag = substr($basetag,0,-6); + } + else + $basetag = str_replace('_',' ',substr($tag,1)); + //create text for link $url = $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag); $newtag = '#[zrl=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/zrl]'; -- cgit v1.2.3