Use "convertForUriId" when possible
This commit is contained in:
@@ -276,7 +276,7 @@ function wppost_send(&$a, &$b)
|
||||
// Remove the share element before fetching the first line
|
||||
$title = trim(preg_replace("/\[share.*?\](.*?)\[\/share\]/ism", "\n$1\n", $b['body']));
|
||||
|
||||
$title = HTML::toPlaintext(BBCode::convert($title, false), 0, true)."\n";
|
||||
$title = BBCode::toPlaintext($title)."\n";
|
||||
$pos = strpos($title, "\n");
|
||||
$trailer = "";
|
||||
if (($pos == 0) || ($pos > 100)) {
|
||||
@@ -289,7 +289,7 @@ function wppost_send(&$a, &$b)
|
||||
}
|
||||
|
||||
$title = '<title>' . (($wptitle) ? $wptitle : DI::l10n()->t('Post from Friendica')) . '</title>';
|
||||
$post = BBCode::convert($b['body'], false, BBCode::CONNECTORS);
|
||||
$post = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
|
||||
|
||||
// If a link goes to youtube then remove the stuff around it. Wordpress detects youtube links and embeds it
|
||||
$post = preg_replace('/<a.*?href="(https?:\/\/www.youtube.com\/.*?)".*?>(.*?)<\/a>/ism', "\n$1\n", $post);
|
||||
|
||||
Reference in New Issue
Block a user