Fixed to avoid creation of unvalid HTML.

dev
Loic d'Anterroches 2008-12-04 14:29:45 +01:00
parent a2ea924448
commit 2e3330a8ad
1 changed files with 2 additions and 3 deletions

View File

@ -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:]/]',
'<a href="\\0" rel="nofollow">\\0</a>',
$text);
$text = preg_replace('#([a-z]+://[^\s\(\)]+)#i',
'<a href="\1">\1</a>', $text);
}
if ($request->rights['hasIssuesAccess']) {
$text = preg_replace_callback('#(issues?|bugs?|tickets?)\s+(\d+)((\s+and|\s+or|,)\s+(\d+)){0,}#im',