aboutsummaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-20 01:48:59 -0700
committerFriendika <info@friendika.com>2011-05-20 01:48:59 -0700
commit1b8e93c70bf5f797598e9ed3168cbe3f811b2db5 (patch)
tree450a64759554a824da0212db6d0a64e5376efbaf /addon
parent681885a120fb44ddb0cee5cab1191a6aea67b3e0 (diff)
downloadvolse-hubzilla-1b8e93c70bf5f797598e9ed3168cbe3f811b2db5.tar.gz
volse-hubzilla-1b8e93c70bf5f797598e9ed3168cbe3f811b2db5.tar.bz2
volse-hubzilla-1b8e93c70bf5f797598e9ed3168cbe3f811b2db5.zip
don't use hashtags for FB message link
Diffstat (limited to 'addon')
-rw-r--r--addon/facebook/facebook.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index cf2bfe434..667b2ce6f 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -479,11 +479,17 @@ 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)) {
- $link = $matches[1];
- if(substr($matches[2],0,5) != '[img]' )
- $linkname = $matches[2];
+ // 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);