From a223c130222fc977c01453855255ecbe81ba1f2c Mon Sep 17 00:00:00 2001 From: Bill Fenner Date: Wed, 24 Jun 1998 05:48:30 +0000 Subject: [PATCH] Fix a typo causing the "src/" cvsweb referencer to kick in when it shouldn't. Save a copy of the un-HTML-ified synopsis for use in the mailto: HREF, otherwise you end up with odd things like "%26lt;" instead of "<". --- data/cgi/query-pr.cgi | 9 +++++---- en/cgi/query-pr.cgi | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/data/cgi/query-pr.cgi b/data/cgi/query-pr.cgi index 53946f71ea..2c428906a7 100755 --- a/data/cgi/query-pr.cgi +++ b/data/cgi/query-pr.cgi @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: query-pr.cgi,v 1.13 1998-06-16 06:46:15 fenner Exp $ +# $Id: query-pr.cgi,v 1.14 1998-06-24 05:48:30 fenner Exp $ $ENV{'PATH'} = "/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin"; @@ -120,6 +120,7 @@ while() { } elsif (/^>Synopsis:/) { $syn = &getline($_); $syn =~ s/[\t]+/ /g; + $origsyn = $syn; $syn = &fixline($syn); print &html_header("Problem Report $cat/$number"); print "$syn

\n

\n"; @@ -156,10 +157,10 @@ close(Q); print "$trailer\n" unless ($blank); print "
"; -$syn =~ s/[\?&%"]/"%" . sprintf("%02X", unpack(C, $&))/eg; +$origsyn =~ s/[\?&%"]/"%" . sprintf("%02X", unpack(C, $&))/eg; $email =~ s/[\?&%]/"%" . sprintf("%02X", unpack(C, $&))/eg; -print "Submit Followup\n"; +print "Submit Followup\n"; print &html_footer; @@ -188,7 +189,7 @@ sub srcref { local($rev) = '(rev\.?|revision):?\s+[0-9]\.[0-9.]+(\s+of)?'; local($src) = '((src|www|doc|ports)/[^\s]+)'; - if (m%$rev\s*$src%oi || m%$src\s*$ref%) { + if (m%$rev\s*$src%oi || m%$src\s*$rev%) { s#$src#sprintf("%s", 34, &cvsweb($1), 34, $1)#ge; } diff --git a/en/cgi/query-pr.cgi b/en/cgi/query-pr.cgi index 53946f71ea..2c428906a7 100755 --- a/en/cgi/query-pr.cgi +++ b/en/cgi/query-pr.cgi @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: query-pr.cgi,v 1.13 1998-06-16 06:46:15 fenner Exp $ +# $Id: query-pr.cgi,v 1.14 1998-06-24 05:48:30 fenner Exp $ $ENV{'PATH'} = "/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin"; @@ -120,6 +120,7 @@ while() { } elsif (/^>Synopsis:/) { $syn = &getline($_); $syn =~ s/[\t]+/ /g; + $origsyn = $syn; $syn = &fixline($syn); print &html_header("Problem Report $cat/$number"); print "$syn

\n

\n"; @@ -156,10 +157,10 @@ close(Q); print "$trailer\n" unless ($blank); print "
"; -$syn =~ s/[\?&%"]/"%" . sprintf("%02X", unpack(C, $&))/eg; +$origsyn =~ s/[\?&%"]/"%" . sprintf("%02X", unpack(C, $&))/eg; $email =~ s/[\?&%]/"%" . sprintf("%02X", unpack(C, $&))/eg; -print "Submit Followup\n"; +print "Submit Followup\n"; print &html_footer; @@ -188,7 +189,7 @@ sub srcref { local($rev) = '(rev\.?|revision):?\s+[0-9]\.[0-9.]+(\s+of)?'; local($src) = '((src|www|doc|ports)/[^\s]+)'; - if (m%$rev\s*$src%oi || m%$src\s*$ref%) { + if (m%$rev\s*$src%oi || m%$src\s*$rev%) { s#$src#sprintf("%s", 34, &cvsweb($1), 34, $1)#ge; }