Fix image links with descriptions in API and AP transmission

This commit is contained in:
Michael 2019-11-11 22:37:50 +00:00
parent babcd24412
commit 1b5fa55bdc
3 changed files with 42 additions and 4 deletions

View file

@ -2554,6 +2554,7 @@ function api_get_attachments(&$body)
{
$text = $body;
$text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $text);
$text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/ism", '[img]$1[/img]', $text);
$URLSearchString = "^\[\]";
$ret = preg_match_all("/\[img\]([$URLSearchString]*)\[\/img\]/ism", $text, $images);