Fix a problem spotted by pav. The Originator field got split into two lines
making it hard to copy/paste the originator field for PR issues. Also make query-pr.cgi xhtml compliant. Submitted by: Daniel Gerzo <danger at rulez dot sk>
This commit is contained in:
parent
ea0acb63fe
commit
1c40c291d1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=25699
1 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/perl -T
|
||||
# $FreeBSD: www/en/cgi/query-pr.cgi,v 1.43 2005/08/11 11:47:01 ceri Exp $
|
||||
# $FreeBSD: www/en/cgi/query-pr.cgi,v 1.44 2005/09/17 15:48:23 remko Exp $
|
||||
|
||||
$ENV{'PATH'} = "/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin";
|
||||
|
||||
|
@ -151,24 +151,25 @@ while(<Q>) {
|
|||
print $trailer . "\n" unless ($blank);
|
||||
$trailer = "<dt><strong>$1</strong></dt><dd>\n";
|
||||
if ($html_fixup) {
|
||||
$trailer .= &fixline($2) . "</dd>";
|
||||
$trailer .= &fixline($2);
|
||||
} else {
|
||||
$trailer .= $2 . "</dd>";
|
||||
$trailer .= $2;
|
||||
}
|
||||
if ($1 eq "Originator" && $from ne "") { # add email address
|
||||
$trailer .= " <<a href='mailto:$email'>" . &fixline($from) . "</a>>";
|
||||
}
|
||||
$trailer .= '</dd>';
|
||||
$blank = !($2);
|
||||
$multiline = 0;
|
||||
} else {
|
||||
unless ($multiline) {
|
||||
next if /^\s*$/;
|
||||
print $trailer . "\n<pre>\n";
|
||||
print $trailer . "\n<dd><pre>\n";
|
||||
}
|
||||
$multiline = 1;
|
||||
$blank = 0;
|
||||
print $html_fixup ? &fixline($_) : $_ , "\n";
|
||||
$trailer = "</pre>";
|
||||
$trailer = "</pre></dd>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +193,7 @@ exit 0;
|
|||
sub getline
|
||||
{
|
||||
local($_) = @_;
|
||||
($tag,$remainder) = split(/[ \t]+/, $_, 2);
|
||||
($tag,$remainder) = split(/\s+/, $_, 2);
|
||||
return $remainder;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue