Merge pull request #455 from pellaeon/pr-1

Preserve br and p from Facebook post content
This commit is contained in:
Teromene 2017-02-01 10:22:42 +00:00 committed by GitHub
commit eb22f86f44

View file

@ -162,7 +162,7 @@ class FacebookBridge extends BridgeAbstract{
$content = preg_replace('/(?i)><div class=\"_4l5([^>]+)>(.+?)<\/div>/i', '', $content);
//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
$content = preg_replace_callback('/ href=\"([^"]+)\"/i', $unescape_fb_link, $content);