if ($bl_username && $bl_password && $bl_blog) {
$title = '<title>' . (($b['title']) ? $b['title'] : DI::l10n()->t('Post from Friendica')) . '</title>';
- $post = $title . BBCode::convert($b['body']);
+ $post = $title . BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
$post = XML::escape($post);
$xml = <<< EOT
if ($dw_username && $dw_password && $dw_blog) {
$title = $b['title'];
- $post = BBCode::convert($b['body']);
+ $post = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
$post = XML::escape($post);
$tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]);
if ($ij_username && $ij_password && $ij_blog) {
$title = $b['title'];
- $post = BBCode::convert($b['body']);
+ $post = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
$post = XML::escape($post);
$tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]);
if($lj_username && $lj_password && $lj_blog) {
$title = XML::escape($b['title']);
- $post = BBCode::convert($b['body']);
+ $post = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
$post = XML::escape($post);
$tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]);
$mail->CharSet = 'utf-8';
$template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/');
$mail->AltBody = BBCode::toPlaintext($item['body']);
- $item['body'] = BBCode::convert($item['body'], false, BBCode::CONNECTORS);
+ $item['body'] = BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::CONNECTORS);
$item['url'] = DI::baseUrl()->get() . '/display/' . $item['guid'];
$mail->Body = Renderer::replaceMacros($template, [
'$upstream' => DI::l10n()->t('Upstream'),
if ($oauth_token && $oauth_token_secret) {
$title = trim($b['title']);
- $content = BBCode::convert($b['body'], false, BBCode::CONNECTORS);
+ $content = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
$params = [];
switch ($siteinfo["type"]) {
case "photo":
$params['type'] = "photo";
- $params['caption'] = BBCode::convert($body, false, BBCode::CONNECTORS);
+ $params['caption'] = BBCode::convertForUriId($b['uri-id'], $body, BBCode::CONNECTORS);;
if (isset($siteinfo["url"])) {
$params['link'] = $siteinfo["url"];
$params['type'] = "link";
$params['title'] = $title;
$params['url'] = $siteinfo["url"];
- $params['description'] = BBCode::convert($body, false, BBCode::CONNECTORS);
+ $params['description'] = BBCode::convertForUriId($b['uri-id'], $body, BBCode::CONNECTORS);
break;
case "audio":
$params['type'] = "audio";
$params['external_url'] = $siteinfo["url"];
- $params['caption'] = BBCode::convert($body, false, BBCode::CONNECTORS);
+ $params['caption'] = BBCode::convertForUriId($b['uri-id'], $body, BBCode::CONNECTORS);
break;
case "video":
$params['type'] = "video";
$params['embed'] = $siteinfo["url"];
- $params['caption'] = BBCode::convert($body, false, BBCode::CONNECTORS);
+ $params['caption'] = BBCode::convertForUriId($b['uri-id'], $body, BBCode::CONNECTORS);
break;
default:
$params['type'] = "text";
$params['title'] = $title;
- $params['body'] = BBCode::convert($b['body'], false, BBCode::CONNECTORS);
+ $params['body'] = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
break;
}
}
if (empty($params['caption']) && !empty($siteinfo["description"])) {
- $params['caption'] = BBCode::convert("[quote]" . $siteinfo["description"] . "[/quote]", false, BBCode::CONNECTORS);
+ $params['caption'] = BBCode::convertForUriId($b['uri-id'], "[quote]" . $siteinfo["description"] . "[/quote]", BBCode::CONNECTORS);
}
$consumer_key = DI::config()->get('tumblr','consumer_key');
$senditemtext = DI::pConfig()->get($rr['uid'], 'windowsphonepush', 'senditemtext');
if ($senditemtext == 1) {
// load item with the max id
- $item = Post::selectFirst(['author-name', 'body'], ['id' => $count[0]['max']]);
+ $item = Post::selectFirst(['author-name', 'body', 'uri-id'], ['id' => $count[0]['max']]);
// as user allows to send the item, we want to show the sender of the item in the toast
// toasts are limited to one line, therefore place is limited - author shall be in
if (substr($body, 0, 4) == "[url") {
$body = "URL/Image ...";
} else {
- $body = BBCode::convert($body, false, BBCode::API, true);
+ $body = BBCode::convertForUriId($item['uri-id'], $body, BBCode::API);
$body = HTML::toPlaintext($body, 0);
$body = ((strlen($body) > 137) ? substr($body, 0, 137) . "..." : $body);
}
// 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)) {
}
$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);