Exclude trailing punctuations from URL

This commit is contained in:
Max Kostikov
2019-07-16 18:11:47 +02:00
committed by Mario
parent b2d1fadf66
commit 821af482f0
4 changed files with 6 additions and 6 deletions

View File

@@ -216,9 +216,9 @@ function red_zrl_callback($matches) {
if($matches[1] === '#^')
$matches[1] = '';
if($zrl)
return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]';
return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]' . $matches[3];
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]';
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]' . $matches[3];
}
/**