From 2e3330a8ad5357d068ea1dfd40b1cf333ff22fd3 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Thu, 4 Dec 2008 14:29:45 +0100 Subject: [PATCH] Fixed to avoid creation of unvalid HTML. --- src/IDF/Template/IssueComment.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/IDF/Template/IssueComment.php b/src/IDF/Template/IssueComment.php index d814799..2bfe3e3 100644 --- a/src/IDF/Template/IssueComment.php +++ b/src/IDF/Template/IssueComment.php @@ -40,9 +40,8 @@ class IDF_Template_IssueComment extends Pluf_Template_Tag if ($wordwrap) $text = wordwrap($text, 69, "\n", true); if ($esc) $text = Pluf_esc($text); if ($autolink) { - $text = ereg_replace('[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]', - '\\0', - $text); + $text = preg_replace('#([a-z]+://[^\s\(\)]+)#i', + '\1', $text); } if ($request->rights['hasIssuesAccess']) { $text = preg_replace_callback('#(issues?|bugs?|tickets?)\s+(\d+)((\s+and|\s+or|,)\s+(\d+)){0,}#im',