Fixed to avoid creation of unvalid HTML.

This commit is contained in:
Loic d'Anterroches 2008-12-04 14:29:45 +01:00
parent a2ea924448
commit 2e3330a8ad

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',