Remove possible (.) from end of url link
This commit is contained in:
parent
59a21be4a0
commit
50993b3ab7
@ -885,6 +885,7 @@ function html_parse($text) {
|
|||||||
$word=$words[$i];
|
$word=$words[$i];
|
||||||
if(preg_match('/https?\:\/\/[^\",]+/i', $word)) {
|
if(preg_match('/https?\:\/\/[^\",]+/i', $word)) {
|
||||||
$nlink = preg_replace('/(\<|\>);/', '', $word);
|
$nlink = preg_replace('/(\<|\>);/', '', $word);
|
||||||
|
$nlink = rtrim($nlink, '.');
|
||||||
$nword = '<a '.$target.' href="'.$nlink.'">'.$word.'</a>';
|
$nword = '<a '.$target.' href="'.$nlink.'">'.$word.'</a>';
|
||||||
if($nword!=$word) {
|
if($nword!=$word) {
|
||||||
$word=$nword;
|
$word=$nword;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user