* 'description' -> Description of the attachment
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- private static function getOldAttachmentData($body)
+ private static function getOldAttachmentData(string $body): array
{
$post = [];
* 'description' -> Description of the attachment
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function getAttachmentData($body)
+ public static function getAttachmentData(string $body): array
{
DI::profiler()->startRecording('rendering');
$data = [
case 'publisher_name':
$data['provider_name'] = html_entity_decode($value, ENT_QUOTES, 'UTF-8');
break;
+
case 'publisher_url':
$data['provider_url'] = html_entity_decode($value, ENT_QUOTES, 'UTF-8');
break;
+
case 'author_name':
$data['author_name'] = html_entity_decode($value, ENT_QUOTES, 'UTF-8');
if ($data['provider_name'] == $data['author_name']) {
$data['author_name'] = '';
}
break;
+
case 'author_url':
$data['author_url'] = html_entity_decode($value, ENT_QUOTES, 'UTF-8');
if ($data['provider_url'] == $data['author_url']) {
$data['author_url'] = '';
}
break;
+
case 'title':
$value = self::convert(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), false, true);
$value = html_entity_decode($value, ENT_QUOTES, 'UTF-8');
$value = str_replace(['[', ']'], ['[', ']'], $value);
$data['title'] = $value;
+
default:
$data[$field] = html_entity_decode($value, ENT_QUOTES, 'UTF-8');
break;
return $data;
}
- public static function getAttachedData($body, $item = [])
+ public static function getAttachedData(string $body, array $item = []): array
{
/*
- text:
}
}
- // if nothing is found, it maybe having an image.
if (!isset($post['type'])) {
- // Simplify image codes
- $body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $body);
- $body = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/ism", '[img]$1[/img]', $body);
$post['text'] = $body;
+ }
- if (preg_match_all("#\[url=([^\]]+?)\]\s*\[img\]([^\[]+?)\[/img\]\s*\[/url\]#ism", $body, $pictures, PREG_SET_ORDER)) {
+ // Simplify image codes
+ $post['text'] = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $post['text']);
+ $post['text'] = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/ism", '[img]$1[/img]', $post['text']);
+
+ // if nothing is found, it maybe having an image.
+ if (!isset($post['type'])) {
+ if (preg_match_all("#\[url=([^\]]+?)\]\s*\[img\]([^\[]+?)\[/img\]\s*\[/url\]#ism", $post['text'], $pictures, PREG_SET_ORDER)) {
if ((count($pictures) == 1) && !$has_title) {
if (!empty($item['object-type']) && ($item['object-type'] == Activity\ObjectType::IMAGE)) {
// Replace the preview picture with the real picture
// Workaround:
// Sometimes photo posts to the own album are not detected at the start.
// So we seem to cannot use the cache for these cases. That's strange.
- if (($data['type'] != 'photo') && strstr($pictures[0][1], "/photos/")) {
+ if (($data['type'] != 'photo') && strstr($pictures[0][1], '/photos/')) {
$data = ParseUrl::getSiteinfo($pictures[0][1]);
}
}
$post['preview'] = $pictures[0][2];
- $post['text'] = trim(str_replace($pictures[0][0], '', $body));
+ $post['text'] = trim(str_replace($pictures[0][0], '', $post['text']));
} else {
$imgdata = Images::getInfoFromURLCached($pictures[0][1]);
if (($imgdata) && substr($imgdata['mime'], 0, 6) == 'image/') {
$post['type'] = 'photo';
$post['image'] = $pictures[0][1];
$post['preview'] = $pictures[0][2];
- $post['text'] = trim(str_replace($pictures[0][0], '', $body));
+ $post['text'] = trim(str_replace($pictures[0][0], '', $post['text']));
}
}
} elseif (count($pictures) > 0) {
}
$post['image'] = $pictures[0][2];
- $post['text'] = $body;
foreach ($pictures as $picture) {
$post['text'] = trim(str_replace($picture[0], '', $post['text']));
}
}
- } elseif (preg_match_all("(\[img\](.*?)\[\/img\])ism", $body, $pictures, PREG_SET_ORDER)) {
+ } elseif (preg_match_all("(\[img\](.*?)\[\/img\])ism", $post['text'], $pictures, PREG_SET_ORDER)) {
if ($has_title) {
$post['type'] = 'link';
$post['url'] = $plink;
}
$post['image'] = $pictures[0][1];
- $post['text'] = $body;
foreach ($pictures as $picture) {
$post['text'] = trim(str_replace($picture[0], '', $post['text']));
}
}
if (!isset($post['type'])) {
- $post['type'] = "text";
- $post['text'] = trim($body);
+ $post['type'] = 'text';
}
if (($post['type'] == 'photo') && empty($post['images']) && !empty($post['remote_images'])) {
if (isset($data['images'][0])) {
$post['image'] = $data['images'][0]['src'];
}
+ } elseif (preg_match_all("#\[url=([^\]]+?)\]\s*\[img\]([^\[]+?)\[/img\]\s*\[/url\]#ism", $post['text'], $pictures, PREG_SET_ORDER)) {
+ foreach ($pictures as $picture) {
+ $post['text'] = trim(str_replace($picture[0], '', $post['text']));
+ }
}
DI::profiler()->stopRecording();
*
* @param string $body
* @param boolean $no_link_desc No link description
- *
* @return string with replaced body
*/
- public static function removeAttachment($body, $no_link_desc = false)
+ public static function removeAttachment(string $body, bool $no_link_desc = false): string
{
return preg_replace_callback("/\s*\[attachment (.*?)\](.*?)\[\/attachment\]\s*/ism",
function ($match) use ($body, $no_link_desc) {
/**
* Converts a BBCode text into plaintext
*
- * @param $text
+ * @param string $text
* @param bool $keep_urls Whether to keep URLs in the resulting plaintext
- *
* @return string
*/
- public static function toPlaintext($text, $keep_urls = true)
+ public static function toPlaintext(string $text, bool $keep_urls = true): string
{
DI::profiler()->startRecording('rendering');
// Remove pictures in advance to avoid unneeded proxy calls
return $naked_text;
}
- private static function proxyUrl($image, $simplehtml = self::INTERNAL, $uriid = 0, $size = '')
+ private static function proxyUrl(string $image, int $simplehtml = self::INTERNAL, int $uriid = 0, string $size = ''): string
{
// Only send proxied pictures to API and for internal display
if (!in_array($simplehtml, [self::INTERNAL, self::API])) {
* @param string $srctext The body with images
* @return string The body with possibly scaled images
*/
- public static function scaleExternalImages(string $srctext)
+ public static function scaleExternalImages(string $srctext): string
{
DI::profiler()->startRecording('rendering');
$s = $srctext;
$c = preg_match_all('/\[img.*?\](.*?)\[\/img\]/ism', $s, $matches, PREG_SET_ORDER);
if ($c) {
foreach ($matches as $mtch) {
- Logger::info('scale_external_image', ['image' => $mtch[1]]);
+ Logger::debug('scale_external_image', ['image' => $mtch[1]]);
$hostname = str_replace('www.', '', substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3));
if (stristr($mtch[1], $hostname)) {
$Image->scaleDown(640);
$new_width = $Image->getWidth();
$new_height = $Image->getHeight();
- Logger::info('External images scaled', ['orig_width' => $orig_width, 'new_width' => $new_width, 'orig_height' => $orig_height, 'new_height' => $new_height, 'match' => $mtch[0]]);
+ Logger::debug('External images scaled', ['orig_width' => $orig_width, 'new_width' => $new_width, 'orig_height' => $orig_height, 'new_height' => $new_height, 'match' => $mtch[0]]);
$s = str_replace(
$mtch[0],
'[img=' . $new_width . 'x' . $new_height. ']' . $mtch[1] . '[/img]'
. "\n",
$s
);
- Logger::info('New string', ['image' => $s]);
+ Logger::debug('New string', ['image' => $s]);
}
}
}
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function limitBodySize($body)
+ public static function limitBodySize(string $body): string
{
DI::profiler()->startRecording('rendering');
$maxlen = DI::config()->get('config', 'max_import_size', 0);
if (($textlen + $img_start) > $maxlen) {
if ($textlen < $maxlen) {
- Logger::info('the limit happens before an embedded image');
+ Logger::debug('the limit happens before an embedded image');
$new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen);
$textlen = $maxlen;
}
if (($textlen + $img_end) > $maxlen) {
if ($textlen < $maxlen) {
- Logger::info('the limit happens before the end of a non-embedded image');
+ Logger::debug('the limit happens before the end of a non-embedded image');
$new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen);
$textlen = $maxlen;
}
if (($textlen + strlen($orig_body)) > $maxlen) {
if ($textlen < $maxlen) {
- Logger::info('the limit happens after the end of the last image');
+ Logger::debug('the limit happens after the end of the last image');
$new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen);
}
} else {
- Logger::info('the text size with embedded images extracted did not violate the limit');
+ Logger::debug('the text size with embedded images extracted did not violate the limit');
$new_body = $new_body . $orig_body;
}
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function convertAttachment($text, $simplehtml = self::INTERNAL, $tryoembed = true, array $data = [], $uriid = 0)
+ public static function convertAttachment(string $text, int $simplehtml = self::INTERNAL, bool $tryoembed = true, array $data = [], int $uriid = 0): string
{
DI::profiler()->startRecording('rendering');
$data = $data ?: self::getAttachmentData($text);
$data['title'] = strip_tags($data['title']);
$data['title'] = str_replace(['http://', 'https://'], '', $data['title']);
} else {
- $data['title'] = null;
+ $data['title'] = '';
}
- if (((strpos($data['text'], "[img=") !== false) || (strpos($data['text'], "[img]") !== false) || DI::config()->get('system', 'always_show_preview')) && !empty($data['image'])) {
+ if (((strpos($data['text'], '[img=') !== false) || (strpos($data['text'], '[img]') !== false) || DI::config()->get('system', 'always_show_preview')) && !empty($data['image'])) {
$data['preview'] = $data['image'];
$data['image'] = '';
}
return trim(($data['text'] ?? '') . ' ' . $return . ' ' . ($data['after'] ?? ''));
}
- public static function removeShareInformation($Text, $plaintext = false, $nolink = false)
+ public static function removeShareInformation(string $text, bool $plaintext = false, bool $nolink = false): string
{
DI::profiler()->startRecording('rendering');
- $data = self::getAttachmentData($Text);
+ $data = self::getAttachmentData($text);
if (!$data) {
DI::profiler()->stopRecording();
- return $Text;
+ return $text;
} elseif ($nolink) {
DI::profiler()->stopRecording();
return $data['text'] . ($data['after'] ?? '');
* @param array $match Array with the matching values
* @return string reformatted link including HTML codes
*/
- private static function convertUrlForActivityPubCallback($match)
+ private static function convertUrlForActivityPubCallback(array $match): string
{
$url = $match[1];
* @param string $url URL that is about to be reformatted
* @return string reformatted link including HTML codes
*/
- private static function convertUrlForActivityPub($url)
+ private static function convertUrlForActivityPub(string $url): string
{
- $html = '<a href="%s" target="_blank" rel="noopener noreferrer">%s</a>';
- return sprintf($html, $url, self::getStyledURL($url));
+ return sprintf('<a href="%s" target="_blank" rel="noopener noreferrer">%s</a>', $url, self::getStyledURL($url));
}
/**
* @param string $url URL that is about to be reformatted
* @return string reformatted link
*/
- private static function getStyledURL($url)
+ private static function getStyledURL(string $url): string
{
$parts = parse_url($url);
$scheme = $parts['scheme'] . '://';
* [noparse][i]italic[/i][/noparse] turns into
* [noparse][ i ]italic[ /i ][/noparse],
* to hide them from parser.
+ *
+ * @param array $match
+ * @return string
*/
- private static function escapeNoparseCallback($match)
+ private static function escapeNoparseCallback(array $match): string
{
$whole_match = $match[0];
$captured = $match[1];
* The previously spacefied [noparse][ i ]italic[ /i ][/noparse],
* now turns back and the [noparse] tags are trimed
* returning [i]italic[/i]
+ *
+ * @param array $match
+ * @return string
*/
- private static function unescapeNoparseCallback($match)
+ private static function unescapeNoparseCallback(array $match): string
{
$captured = $match[1];
$unspacefied = preg_replace("/\[ (.*?)\ ]/", "[$1]", $captured);
* @param int $occurrences Number of first occurrences to skip
* @return boolean|array
*/
- public static function getTagPosition($text, $name, $occurrences = 0)
+ public static function getTagPosition(string $text, string $name, int $occurrences = 0)
{
DI::profiler()->startRecording('rendering');
if ($occurrences < 0) {
* @param string $text Text to search
* @return string
*/
- public static function pregReplaceInTag($pattern, $replace, $name, $text)
+ public static function pregReplaceInTag(string $pattern, string $replace, string $name, string $text): string
{
DI::profiler()->startRecording('rendering');
$occurrences = 0;
return $text;
}
- private static function extractImagesFromItemBody($body)
+ private static function extractImagesFromItemBody(string $body): array
{
$saved_image = [];
$orig_body = $body;
return ['body' => $new_body, 'images' => $saved_image];
}
- private static function interpolateSavedImagesIntoItemBody($uriid, $body, array $images)
+ private static function interpolateSavedImagesIntoItemBody(int $uriid, string $body, array $images): string
{
$newbody = $body;
/**
* @param string $text A BBCode string
* @return array Empty array if no share tag is present or the following array, missing attributes end up empty strings:
- * - comment: Text before the opening share tag
- * - shared : Text inside the share tags
- * - author : (Optional) Display name of the shared author
- * - profile: (Optional) Profile page URL of the shared author
- * - avatar : (Optional) Profile picture URL of the shared author
- * - link : (Optional) Canonical URL of the shared post
- * - posted : (Optional) Date the shared post was initially posted ("Y-m-d H:i:s" in GMT)
- * - guid : (Optional) Shared post GUID if any
+ * - comment : Text before the opening share tag
+ * - shared : Text inside the share tags
+ * - author : (Optional) Display name of the shared author
+ * - profile : (Optional) Profile page URL of the shared author
+ * - avatar : (Optional) Profile picture URL of the shared author
+ * - link : (Optional) Canonical URL of the shared post
+ * - posted : (Optional) Date the shared post was initially posted ("Y-m-d H:i:s" in GMT)
+ * - message_id: (Optional) Shared post URI if any
+ * - guid : (Optional) Shared post GUID if any
*/
public static function fetchShareAttributes(string $text): array
{
DI::profiler()->startRecording('rendering');
+ if (preg_match('~(.*?)\[share](.*)\[/share]~ism', $text, $matches)) {
+ return [
+ 'author' => '',
+ 'profile' => '',
+ 'avatar' => '',
+ 'link' => '',
+ 'posted' => '',
+ 'guid' => '',
+ 'message_id' => trim($matches[2]),
+ 'comment' => trim($matches[1]),
+ 'shared' => '',
+ ];
+ }
// See Issue https://github.com/friendica/friendica/issues/10454
// Hashtags in usernames are expanded to links. This here is a quick fix.
$text = preg_replace('~([@!#])\[url=.*?](.*?)\[/url]~ism', '$1$2', $text);
private static function extractShareAttributes(string $shareString): array
{
$attributes = [];
- foreach (['author', 'profile', 'avatar', 'link', 'posted', 'guid'] as $field) {
+ foreach (['author', 'profile', 'avatar', 'link', 'posted', 'guid', 'message_id'] as $field) {
preg_match("/$field=(['\"])(.+?)\\1/ism", $shareString, $matches);
$attributes[$field] = html_entity_decode($matches[2] ?? '', ENT_QUOTES, 'UTF-8');
}
* @param callable $callback
* @return string The BBCode string with all [share] blocks replaced
*/
- public static function convertShare($text, callable $callback, int $uriid = 0)
+ public static function convertShare(string $text, callable $callback, int $uriid = 0): string
{
DI::profiler()->startRecording('rendering');
$return = preg_replace_callback(
* @param integer $uriid
* @return string
*/
- private static function convertImages(string $text, int $simplehtml, int $uriid = 0):string
+ private static function convertImages(string $text, int $simplehtml, int $uriid = 0): string
{
DI::profiler()->startRecording('rendering');
$return = preg_replace_callback(
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- private static function convertShareCallback(array $attributes, array $author_contact, $content, $is_quote_share, $simplehtml)
+ private static function convertShareCallback(array $attributes, array $author_contact, string $content, bool $is_quote_share, int $simplehtml): string
{
DI::profiler()->startRecording('rendering');
$mention = $attributes['author'] . ' (' . ($author_contact['addr'] ?? '') . ')';
return $text;
}
- private static function removePictureLinksCallback($match)
+ private static function removePictureLinksCallback(array $match): string
{
$cache_key = 'remove:' . $match[1];
$text = DI::cache()->get($cache_key);
}
if (substr($mimetype, 0, 6) == 'image/') {
- $text = "[url=" . $match[1] . ']' . $match[1] . "[/url]";
+ $text = '[url=' . $match[1] . ']' . $match[1] . '[/url]';
} else {
- $text = "[url=" . $match[2] . ']' . $match[2] . "[/url]";
+ $text = '[url=' . $match[2] . ']' . $match[2] . '[/url]';
// if its not a picture then look if its a page that contains a picture link
$body = DI::httpClient()->fetch($match[1], HttpClientAccept::HTML, 0);
$doc = new DOMDocument();
@$doc->loadHTML($body);
$xpath = new DOMXPath($doc);
- $list = $xpath->query("//meta[@name]");
+ $list = $xpath->query('//meta[@name]');
foreach ($list as $node) {
$attr = [];
$doc = new DOMDocument();
@$doc->loadHTML($body);
$xpath = new DOMXPath($doc);
- $list = $xpath->query("//meta[@name]");
+ $list = $xpath->query('//meta[@name]');
foreach ($list as $node) {
$attr = [];
if ($node->attributes->length) {
* $match[1] = $url
* $match[2] = $title or absent
*/
- $try_oembed_callback = function ($match)
+ $try_oembed_callback = function (array $match)
{
$url = $match[1];
- $title = $match[2] ?? null;
+ $title = $match[2] ?? '';
try {
$return = OEmbed::getHTML($url, $title);
$text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism", '<br><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . DI::l10n()->t('Encrypted content') . '" /><br>', $text);
$text = preg_replace("/\[crypt(.*?)\](.*?)\[\/crypt\]/ism", '<br><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . '$1' . ' ' . DI::l10n()->t('Encrypted content') . '" /><br>', $text);
- //$Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism", '<br><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . '$1' . ' ' . DI::l10n()->t('Encrypted content') . '" /><br>', $Text);
+ //$text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism", '<br><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . '$1' . ' ' . DI::l10n()->t('Encrypted content') . '" /><br>', $text);
// Simplify "video" element
$text = preg_replace('(\[video[^\]]*?\ssrc\s?=\s?([^\s\]]+)[^\]]*?\].*?\[/video\])ism', '[video]$1[/video]', $text);
if ($try_oembed) {
$text = preg_replace_callback("/\[youtube\](https?:\/\/www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", $try_oembed_callback, $text);
$text = preg_replace_callback("/\[youtube\](www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", $try_oembed_callback, $text);
+ $text = preg_replace_callback("/\[youtube\](https?:\/\/www.youtube.com\/shorts\/.*?)\[\/youtube\]/ism", $try_oembed_callback, $text);
$text = preg_replace_callback("/\[youtube\](https?:\/\/youtu.be\/.*?)\[\/youtube\]/ism", $try_oembed_callback, $text);
}
$text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/ism", '[youtube]$1[/youtube]', $text);
$text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/embed\/(.*?)\[\/youtube\]/ism", '[youtube]$1[/youtube]', $text);
+ $text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/shorts\/(.*?)\[\/youtube\]/ism", '[youtube]$1[/youtube]', $text);
$text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism", '[youtube]$1[/youtube]', $text);
if ($try_oembed) {
if (in_array($simple_html, [self::OSTATUS, self::TWITTER])) {
$text = preg_replace_callback("/([^#@!])\[url\=([^\]]*)\](.*?)\[\/url\]/ism", "self::expandLinksCallback", $text);
- //$Text = preg_replace("/[^#@!]\[url\=([^\]]*)\](.*?)\[\/url\]/ism", ' $2 [url]$1[/url]', $Text);
- $text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", ' $2 [url]$1[/url]',$text);
+ //$text = preg_replace("/[^#@!]\[url\=([^\]]*)\](.*?)\[\/url\]/ism", ' $2 [url]$1[/url]', $text);
+ $text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", ' $2 [url]$1[/url]', $text);
}
// Perform URL Search
$tagline .= '#' . $tag . ' ';
}
}
- $text = $text . " " . $tagline;
+ $text = $text . ' ' . $tagline;
}
} else {
$text = self::convert($text, false, self::CONNECTORS);
* Returns array of tags found, or empty array.
*
* @param string $string Post content
- *
* @return array List of tag and person names
*/
public static function getTags(string $string): array
public static function expandTags(string $body): string
{
return preg_replace_callback("/(?<=\W|^)([!#@])([^\^ \x0D\x0A,;:?'\"]*[^\^ \x0D\x0A,;:?!'\".])/",
- function ($match) {
+ function (array $match) {
switch ($match[1]) {
case '!':
case '@':
return $match[1] . $match[2];
}
break;
+
case '#':
default:
return $match[1] . '[url=' . DI::baseUrl() . '/search?tag=' . $match[2] . ']' . $match[2] . '[/url]';
* @param string $link Post source URL
* @param string $posted Post created date
* @param string|null $guid Post guid (if any)
+ * @param string|null $uri Post uri (if any)
* @return string
* @TODO Rewrite to handle over whole record array
*/
- public static function getShareOpeningTag(string $author, string $profile, string $avatar, string $link, string $posted, string $guid = null): string
+ public static function getShareOpeningTag(string $author, string $profile, string $avatar, string $link, string $posted, string $guid = null, string $uri = null): string
{
DI::profiler()->startRecording('rendering');
$header = "[share author='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $author) .
$header .= "' guid='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $guid);
}
+ if ($uri) {
+ $header .= "' message_id='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $uri);
+ }
+
$header .= "']";
DI::profiler()->stopRecording();
* @param string|null $tags
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
- *@see ParseUrl::getSiteinfoCached
- *
+ * @see ParseUrl::getSiteinfoCached
*/
public static function embedURL(string $url, bool $tryAttachment = true, string $title = null, string $description = null, string $tags = null): string
{