From 658f2f569dfb06448d7f45c370e7a1b468dd36a2 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Sat, 11 Mar 2000 02:01:18 +0000 Subject: Italicize the "Additional Comments From" stuff, so that you can tell the difference between new comments and people copying stuff in from old comments. --- bug_form.pl | 90 ++----------------------------------------------------------- 1 file changed, 2 insertions(+), 88 deletions(-) (limited to 'bug_form.pl') diff --git a/bug_form.pl b/bug_form.pl index bac65d14c..e74f4f4d8 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -40,89 +40,6 @@ sub bug_form_pl_sillyness { $zz = @::legal_severity; } -my %knownattachments; - -# This routine quoteUrls contains inspirations from the HTML::FromText CPAN -# module by Gareth Rees . It has been heavily hacked, -# all that is really recognizable from the original is bits of the regular -# expressions. - -sub quoteUrls { - my $text = shift; # Take a copy; don't modify in-place. - return $text unless $text; - - my $base = Param('urlbase'); - - my $protocol = join '|', - qw(afs cid ftp gopher http https mid news nntp prospero telnet wais); - - my %options = ( metachars => 1, @_ ); - - my $count = 0; - - # Now, quote any "#" characters so they won't confuse stuff later - $text =~ s/#/%#/g; - - # Next, find anything that looks like a URL or an email address and - # pull them out the the text, replacing them with a "#### - # marker, and writing them into an array. All this confusion is - # necessary so that we don't match on something we've already replaced, - # which can happen if you do multiple s///g operations. - - my @things; - while ($text =~ s%((mailto:)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b| - (\b((?:$protocol):[^ \t\n<>"]+[\w/])))%"##$count##"%exo) { - my $item = $&; - - $item = value_quote($item); - - if ($item !~ m/^$protocol:/o && $item !~ /^mailto:/) { - # We must have grabbed this one because it looks like an email - # address. - $item = qq{$item}; - } else { - $item = qq{$item}; - } - - $things[$count++] = $item; - } - while ($text =~ s/\bbug(\s|%\#)*(\d+)/"##$count##"/ei) { - my $item = $&; - my $num = $2; - $item = value_quote($item); # Not really necessary, since we know - # there's no special chars in it. - $item = qq{$item}; - $things[$count++] = $item; - } - while ($text =~ s/\*\*\* This bug has been marked as a duplicate of (\d+) \*\*\*/"##$count##"/ei) { - my $item = $&; - my $num = $1; - $item =~ s@\d+@$num@; - $things[$count++] = $item; - } - while ($text =~ s/Created an attachment \(id=(\d+)\)/"##$count##"/e) { - my $item = $&; - my $num = $1; - if (exists $knownattachments{$num}) { - $item = qq{$item}; - } - $things[$count++] = $item; - } - - $text = value_quote($text); - $text =~ s/\ /\n/g; - - # Stuff everything back from the array. - for (my $i=0 ; $i<$count ; $i++) { - $text =~ s/##$i##/$things[$i]/e; - } - - # And undo the quoting of "#" characters. - $text =~ s/%#/#/g; - - return $text; -} - my $loginok = quietly_check_login(); my $id = $::FORM{'id'}; @@ -208,7 +125,7 @@ print qq{
\n}; # print qq{\n}; # } -$bug{'long_desc'} = GetLongDescription($id); +$bug{'long_desc'} = GetLongDescriptionAsHTML($id); my $longdesclength = length($bug{'long_desc'}); GetVersionTable(); @@ -370,7 +287,6 @@ while (MoreSQLData()) { my $link = "showattachment.cgi?attach_id=$attachid"; $desc = value_quote($desc); print qq{$date$desc}; - $knownattachments{$attachid} = 1; } print "Create a new attachment (proposed patch, testcase, etc.)\n"; @@ -550,11 +466,9 @@ print "
Description: Opened: $bug{'creation_ts'}

-
 ";
-print quoteUrls($bug{'long_desc'}, email=>1, urls=>1);
+print $bug{'long_desc'};
 print "
-

\n"; # To add back option of editing the long description, insert after the above -- cgit v1.2.3-24-g4f1b