From: friendica Date: Mon, 6 Feb 2012 00:31:48 +0000 (-0800) Subject: bug #263, strip out hashtag links even though this loses information. This should... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ca86156d9b7b4251daa2be5a31a87060b3562b6c;p=friendica-addons.git bug #263, strip out hashtag links even though this loses information. This should be configurable. --- diff --git a/facebook.tgz b/facebook.tgz index 484d8eae..e049d2b8 100755 Binary files a/facebook.tgz and b/facebook.tgz differ diff --git a/facebook/facebook.php b/facebook/facebook.php index 3cf5ee8d..f155d397 100755 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -636,6 +636,12 @@ function facebook_post_hook(&$a,&$b) { } } + // strip tag links to avoid link clutter, this really should be + // configurable because we're losing information + + $msg = preg_replace("/\#\[url=(.*?)\](.*?)\[\/url\]/is",'#$2',$msg); + + // provide the link separately for normal links $msg = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/is",'$2 $1',$msg); if(preg_match("/\[img\](.*?)\[\/img\]/is",$msg,$matches))