don't use hashtags for FB message link

This commit is contained in:
Friendika 2011-05-20 01:48:59 -07:00
parent 681885a120
commit 1b8e93c70b

View file

@ -479,12 +479,18 @@ function facebook_post_hook(&$a,&$b) {
if($b['verb'] == ACTIVITY_DISLIKE)
$msg = trim(strip_tags(bbcode($msg)));
$search_str = $a->get_baseurl() . '/search';
if(preg_match("/\[url=(.+?)\](.+?)\[\/url\]/is",$msg,$matches)) {
// don't use hashtags for message link
if(strpos($matches[2],$search_str) === false) {
$link = $matches[1];
if(substr($matches[2],0,5) != '[img]')
$linkname = $matches[2];
}
}
$msg = preg_replace("/\[url=(.+?)\](.+?)\[\/url\]/is",'$2 $1',$msg);