]> git.mxchange.org Git - friendica-addons.git/commitdiff
escape tags for FB posts
authorfriendica <info@friendica.com>
Tue, 6 Dec 2011 23:23:15 +0000 (15:23 -0800)
committerfriendica <info@friendica.com>
Tue, 6 Dec 2011 23:23:15 +0000 (15:23 -0800)
facebook.tgz
facebook/facebook.php

index 0ecd878cd0065a4946081d9ac704ccf0cd5c0ea2..062cb5e1158cbe31ff03519681031712d565df9b 100644 (file)
Binary files a/facebook.tgz and b/facebook.tgz differ
index 6599a7a7dd9c4a8cb598214359fe526c59f40809..00f7c4b2a3677a4306f1104ff3c9ac88bccad390 100644 (file)
@@ -937,13 +937,8 @@ function fb_consume_stream($uid,$j,$wall = false) {
 
                        if(count($blocked_apps_arr)) {
                                foreach($blocked_apps_arr as $bad_appl) {
-                                       if(! strlen(trim($bad_appl))) {
-                                               continue;
-                                       }
-
-                                       if(stristr($datarray['app'],$bad_appl)) {
+                                       if(strlen(trim($bad_appl)) && (stristr($datarray['app'],trim($bad_appl)))) {
                                                $found_blocked = true;
-                                               break;
                                        }
                                }
                        }
@@ -958,7 +953,7 @@ function fb_consume_stream($uid,$j,$wall = false) {
                        $datarray['author-avatar'] = 'https://graph.facebook.com/' . $from->id . '/picture';
                        $datarray['plink'] = $datarray['author-link'] . '&v=wall&story_fbid=' . substr($entry->id,strpos($entry->id,'_') + 1);
 
-                       $datarray['body'] = $entry->message;
+                       $datarray['body'] = escape_tags($entry->message);
 
                        if($entry->picture && $entry->link) {
                                $datarray['body'] .= "\n\n" . '[url=' . $entry->link . '][img]' . $entry->picture . '[/img][/url]';