]> git.mxchange.org Git - friendica.git/blobdiff - include/plaintext.php
Merge pull request #3077 from Hypolite/issue/#3039-mod-1of3
[friendica.git] / include / plaintext.php
index d98d736550469225f226b6fbc7341065b9b43fef..83027286798d574c08a9c64acf99fb8d1b08c803 100644 (file)
@@ -63,6 +63,10 @@ function get_old_attachment_data($body) {
                                $post["url"] = $matches[1];
                                $post["title"] = $matches[2];
                        }
+                       if (($post["url"] == "") AND (in_array($post["type"], array("link", "video")))
+                               AND preg_match("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $attacheddata, $matches)) {
+                               $post["url"] = $matches[1];
+                       }
 
                        // Search for description
                        if (preg_match("/\[quote\](.*?)\[\/quote\]/ism", $attacheddata, $matches))