From a33abd8758d0e31024c507ddec5b8dced51f404c Mon Sep 17 00:00:00 2001 From: Pk11 Date: Mon, 24 Apr 2023 01:44:08 +0000 Subject: [PATCH] Fix link regex --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 207b42b..351d3da 100644 --- a/index.php +++ b/index.php @@ -285,7 +285,7 @@ if(!empty($row['comment'])) { $comment = $row['comment']; $comment = preg_replace('/^>(?!>\d).+/m', '$0', $comment); - $comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s,]+/m', '$0', $comment); + $comment = preg_replace('/(?:https?|mailto|tel|ftp):.+?(?=\s|,|<|<|$)/m', '$0', $comment); $comment = preg_replace_callback('/>>\s*(\d+)/', 'quote_link', $comment); $comment = str_replace("\n", "
", $comment); echo "
$comment
";