Merge pull request #7738 from annando/clean-url

Convert links with empty descriptions
pull/7746/head
Hypolite Petovan 2019-10-13 20:11:28 -04:00 committed by GitHub
commit c07cb2c8f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ function item_post(App $a) {
$body .= $att_bbcode; $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)) { if (!empty($orig_post)) {
$str_group_allow = $orig_post['allow_gid']; $str_group_allow = $orig_post['allow_gid'];
$str_contact_allow = $orig_post['allow_cid']; $str_contact_allow = $orig_post['allow_cid'];