]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Fix image links with descriptions in API and AP transmission
[friendica.git] / include / api.php
index d5eb9c54186d12089d719963f78ca92888b9b1c8..8325e39b71442f6518054ac1293ea3657ae666ab 100644 (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);