Author: jajcus
Date: Sun Jun 26 16:58:21 2005
New Revision: 6186
Modified:
PLD-BTS/trunk/flyspray/scripts/details.php
Log:
- URL handling fixed
Modified: PLD-BTS/trunk/flyspray/scripts/details.php
==============================================================================
--- PLD-BTS/trunk/flyspray/scripts/details.php (original)
+++ PLD-BTS/trunk/flyspray/scripts/details.php Sun Jun 26 16:58:21 2005
@@ -479,7 +479,7 @@
<td id="details" class="details" colspan="3">
<?php
// Change URLs to hyperlinks
- $detailed_desc =
ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a
href=\"\\0\">\\0</a>", $detailed_desc);
+ $detailed_desc =
preg_replace("/[[:alpha:]]+:\\/\\/((\\&\w+;)|[^<>[:space:]&])+[[:alnum:];\\/]/","<a
href=\"$0\">$0</a>", $detailed_desc);
// Change FS#123 into hyperlinks to tasks
$detailed_desc = preg_replace("/\b(FS#)(\d+)\b/", "<a
href=\"?do=details&id=$2\">$0</a>", $detailed_desc);
echo nl2br($detailed_desc); ?>
@@ -641,7 +641,7 @@
$comment_text = htmlspecialchars($row['comment_text']);
$comment_text = nl2br($comment_text);
// Change URLs into hyperlinks
- $comment_text =
ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\"
target=\"_blank\">\\0</a>", $comment_text);
+ $comment_text =
preg_replace("/[[:alpha:]]+:\\/\\/((\\&\w+;)|[^<>[:space:]&])+[[:alnum:];\\/]/","<a
href=\"$0\">$0</a>", $comment_text);
// Change FS#123 into hyperlinks to tasks
$comment_text = preg_replace("/\b(FS#)(\d+)\b/", "<a
href=\"?do=details&id=$2\">$0</a>", $comment_text);
if (!get_magic_quotes_gpc()) {
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit