let normal hashtags be quoted strings also

This commit is contained in:
friendica
2014-04-12 16:58:19 -07:00
parent 5cb7e48dad
commit d7aaff459f
2 changed files with 21 additions and 2 deletions

View File

@@ -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]';