From 9559ea4fc6f7758c5252fb5cee1b5fa5315da94a Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 27 Oct 2008 18:08:29 +0000 Subject: Fixed bug, where links were not converted corretly when residing at the end of the message. --- forum/utils/parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forum/utils/parser.php') diff --git a/forum/utils/parser.php b/forum/utils/parser.php index 5864753..f79be2a 100644 --- a/forum/utils/parser.php +++ b/forum/utils/parser.php @@ -42,7 +42,7 @@ function parse($input, $indent = "") $output = preg_replace("/http:\/\/(.*?\.jpg|.*?\.gif|.*?\.png|.*?\.jpeg)/", $imgstartmarker."$1".$imgendmarker, $output); // Replace URLs with tags - $output = preg_replace("/http:\/\/(.*?)([\n ])/s", "$1$2", $output); + $output = preg_replace("/http:\/\/(.*?)([\n ]|$)/s", "$1$2", $output); // Convert marked images to img tags and links $output = preg_replace("/".$imgstartmarker."(.*?)".$imgendmarker."/s", "\"$1\"", $output); -- cgit v1.2.3