summaryrefslogtreecommitdiff
path: root/forum/utils/parser.php
diff options
context:
space:
mode:
authordeva <deva>2008-10-27 18:08:29 +0000
committerdeva <deva>2008-10-27 18:08:29 +0000
commit9559ea4fc6f7758c5252fb5cee1b5fa5315da94a (patch)
tree016a88aed67da69959b3a85d66e52fabea0c289b /forum/utils/parser.php
parentbdad9a1ba9e68c016759374fb24059f571d98435 (diff)
Fixed bug, where links were not converted corretly when residing at the end of the message.
Diffstat (limited to 'forum/utils/parser.php')
-rw-r--r--forum/utils/parser.php2
1 files changed, 1 insertions, 1 deletions
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 <a></a> tags
- $output = preg_replace("/http:\/\/(.*?)([\n ])/s", "<a href=\"http://$1\">$1</a>$2", $output);
+ $output = preg_replace("/http:\/\/(.*?)([\n ]|$)/s", "<a href=\"http://$1\">$1</a>$2", $output);
// Convert marked images to img tags and links
$output = preg_replace("/".$imgstartmarker."(.*?)".$imgendmarker."/s", "<a href=\"http://$1\"><img alt=\"$1\" src=\"?mode=imagecache&amp;uri=http://$1\"/></a>", $output);