1
0
Fork 0
forked from blallo/rss-bridge

Preserve br and p from Facebook post content

This commit is contained in:
Pellaeon Lin 2017-01-13 06:38:05 +08:00
parent 670d8f18cb
commit 9c1bedb33f

View file

@ -162,7 +162,7 @@ class FacebookBridge extends BridgeAbstract{
$content = preg_replace('/(?i)><div class=\"_4l5([^>]+)>(.+?)<\/div>/i', '', $content); $content = preg_replace('/(?i)><div class=\"_4l5([^>]+)>(.+?)<\/div>/i', '', $content);
//Remove html nodes, keep only img, links, basic formatting //Remove html nodes, keep only img, links, basic formatting
$content = strip_tags($content,'<a><img><i><u>'); $content = strip_tags($content,'<a><img><i><u><br><p>');
//Adapt link hrefs: convert relative links into absolute links and bypass external link redirection //Adapt link hrefs: convert relative links into absolute links and bypass external link redirection
$content = preg_replace_callback('/ href=\"([^"]+)\"/i', $unescape_fb_link, $content); $content = preg_replace_callback('/ href=\"([^"]+)\"/i', $unescape_fb_link, $content);