1
1
Fork 0

Merge pull request #7829 from annando/picture-links

Fix image links with descriptions in API and AP transmission
This commit is contained in:
Hypolite Petovan 2019-11-12 07:14:27 -05:00 committed by GitHub
commit 35ece9924d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);