From 9c1bedb33f3218008dbe7dab1dd740241387dd42 Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Fri, 13 Jan 2017 06:38:05 +0800 Subject: [PATCH] Preserve br and p from Facebook post content --- bridges/FacebookBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php index 230c11f..5c7b898 100644 --- a/bridges/FacebookBridge.php +++ b/bridges/FacebookBridge.php @@ -162,7 +162,7 @@ class FacebookBridge extends BridgeAbstract{ $content = preg_replace('/(?i)>
]+)>(.+?)<\/div>/i', '', $content); //Remove html nodes, keep only img, links, basic formatting - $content = strip_tags($content,''); + $content = strip_tags($content,'

'); //Adapt link hrefs: convert relative links into absolute links and bypass external link redirection $content = preg_replace_callback('/ href=\"([^"]+)\"/i', $unescape_fb_link, $content);