const ACTIVITYPUB = 9;
const BLUESKY = 10;
- const TOP_ANCHOR = '<br class="top-anchor">';
+ const SHARED_ANCHOR = '<hr class="shared-anchor">';
+ const TOP_ANCHOR = '<br class="top-anchor">';
const BOTTOM_ANCHOR = '<br class="button-anchor">';
const PREVIEW_NONE = 0;
break;
case 'title':
- $value = self::convert(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), false, true);
+ $value = self::convertForUriId(0, html_entity_decode($value, ENT_QUOTES, 'UTF-8'), BBCode::EXTERNAL);
$value = html_entity_decode($value, ENT_QUOTES, 'UTF-8');
$value = str_replace(['[', ']'], ['[', ']'], $value);
$data['title'] = $value;
// Remove attachment
$text = self::replaceAttachment($text);
- $naked_text = HTML::toPlaintext(self::convert($text, false, 0, true), 0, !$keep_urls);
+ $naked_text = HTML::toPlaintext(self::convert($text, false, BBCode::EXTERNAL, true), 0, !$keep_urls);
DI::profiler()->stopRecording();
return $naked_text;
$network = $contact['network'] ?? Protocol::PHANTOM;
$tpl = Renderer::getMarkupTemplate('shared_content.tpl');
- $text .= Renderer::replaceMacros($tpl, [
+ $text .= BBCode::SHARED_ANCHOR . Renderer::replaceMacros($tpl, [
'$profile' => $attributes['profile'],
'$avatar' => $attributes['avatar'],
'$author' => $attributes['author'],
// Convert it to HTML - don't try oembed
if ($for_diaspora) {
- $text = self::convert($text, false, self::DIASPORA);
+ $text = self::convertForUriId(0, $text, self::DIASPORA);
// Add all tags that maybe were removed
if (preg_match_all("/#\[url\=([$url_search_string]*)\](.*?)\[\/url\]/ism", $original_text, $tags)) {
$text = $text . ' ' . $tagline;
}
} else {
- $text = self::convert($text, false, self::CONNECTORS);
+ $text = self::convertForUriId(0, $text, self::CONNECTORS);
}
// If a link is followed by a quote then there should be a newline before it