Trim comma from url links

This commit is contained in:
Retro_Guy 2021-06-17 07:06:01 +00:00
parent 1f31a3c809
commit 58090b0120
1 changed files with 1 additions and 1 deletions

View File

@ -884,7 +884,7 @@ function html_parse($text) {
for($i=0; $i<$n; $i++) {
$word=$words[$i];
if(preg_match('/(https?|ftp|news|gopher|telnet)\:\/\/[^\",]+/i', $word)) {
$nlink = trim($word, '().');
$nlink = trim($word, '().,');
$nlink = preg_replace('/(\&lt|\&gt|\&nbsp);/', '', $nlink);
$nword = '<a '.$target.' href="'.$nlink.'">'.$word.'</a>';
if($nword!=$word && substr($nlink, strlen($nlink) - 3) != "://") {