aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-04-12 16:58:19 -0700
committerfriendica <info@friendica.com>2014-04-12 16:58:19 -0700
commitd7aaff459f7a7fc58568bc2cb58c1aa22061bfb4 (patch)
treee792e8fc6ab4664fccab73892c54a100c2af956b /mod
parent5cb7e48dad49463686e6ae994f35b9c6654bf79d (diff)
downloadvolse-hubzilla-d7aaff459f7a7fc58568bc2cb58c1aa22061bfb4.tar.gz
volse-hubzilla-d7aaff459f7a7fc58568bc2cb58c1aa22061bfb4.tar.bz2
volse-hubzilla-d7aaff459f7a7fc58568bc2cb58c1aa22061bfb4.zip
let normal hashtags be quoted strings also
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php10
1 files changed, 9 insertions, 1 deletions
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) === '#&quot;') && (substr($tag,-6,6) === '&quot;')) {
+ $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]';