]> git.mxchange.org Git - friendica.git/commitdiff
Convert links with empty descriptions
authorMichael <heluecht@pirati.ca>
Sun, 13 Oct 2019 15:52:33 +0000 (15:52 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 13 Oct 2019 15:52:33 +0000 (15:52 +0000)
mod/item.php

index b1c0355e01a5c2032fd73a1aac76c5f7056aa486..34882497e40e2d70fdaef77a4127e1bbcf22b7a3 100644 (file)
@@ -229,6 +229,9 @@ function item_post(App $a) {
                $body .= $att_bbcode;
        }
 
+       // Convert links with empty descriptions to links without an explicit description
+       $body = preg_replace('(\[url=(.*?)\]\[\/url\])ism', '[url]$1[/url]', $body);
+
        if (!empty($orig_post)) {
                $str_group_allow   = $orig_post['allow_gid'];
                $str_contact_allow = $orig_post['allow_cid'];