summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authorterry%netscape.com <>1999-04-11 02:42:24 +0200
committerterry%netscape.com <>1999-04-11 02:42:24 +0200
commit310ce18f525d6f65ca6df35377d00f3d212c40ea (patch)
treed2b313631200f691ff737e6c9331270801358aa6 /CGI.pl
parent649a61fb9224b6f038b8de9a40d29f12bc41d485 (diff)
downloadbugzilla-310ce18f525d6f65ca6df35377d00f3d212c40ea.tar.gz
bugzilla-310ce18f525d6f65ca6df35377d00f3d212c40ea.tar.xz
Fixed bug 4928 -- wasn't encoding multi-line value fields properly,
which busted modern browsers (like, Mozilla itself).
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl12
1 files changed, 2 insertions, 10 deletions
diff --git a/CGI.pl b/CGI.pl
index 890a8edf7..e580c1baa 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -186,19 +186,11 @@ sub value_quote {
$var =~ s/</\&lt;/g;
$var =~ s/>/\&gt;/g;
$var =~ s/"/\&quot;/g;
+ $var =~ s/\n/\&#010;/g;
+ $var =~ s/\r/\&#013;/g;
return $var;
}
-sub value_unquote {
- my ($var) = (@_);
- $var =~ s/\&quot/\"/g;
- $var =~ s/\&lt/</g;
- $var =~ s/\&gt/>/g;
- $var =~ s/\&amp/\&/g;
- return $var;
-}
-
-
sub navigation_header {
if (defined $::COOKIE{"BUGLIST"} && $::COOKIE{"BUGLIST"} ne "") {
my @bugs = split(/:/, $::COOKIE{"BUGLIST"});