mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Use "convertForUriId" when possible
This commit is contained in:
parent
b164910032
commit
9eaa6a2c08
9 changed files with 16 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue