From 5875830d1ea86495762d395ff5949843d77bd24a Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 13 Oct 2019 15:52:33 +0000 Subject: [PATCH] Convert links with empty descriptions --- mod/item.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/item.php b/mod/item.php index b1c0355e01..34882497e4 100644 --- a/mod/item.php +++ b/mod/item.php @@ -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'];