summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-07-19 23:03:51 +0200
committerbbaetz%student.usyd.edu.au <>2002-07-19 23:03:51 +0200
commit603921c6defa74ef95318c14323a18cf26f3a390 (patch)
treec1fd02f21c852fc66cbaefb6b53c065c2ee5e095 /globals.pl
parent42c44b90deed374299ad79604a733ad52116ba7f (diff)
downloadbugzilla-603921c6defa74ef95318c14323a18cf26f3a390.tar.gz
bugzilla-603921c6defa74ef95318c14323a18cf26f3a390.tar.xz
Bug 157074 - verify-new-product doubles comment linefeeds on Win32
r=myk, jouni
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/globals.pl b/globals.pl
index 31bed4f06..19be37b81 100644
--- a/globals.pl
+++ b/globals.pl
@@ -1561,6 +1561,20 @@ $::template ||= Template->new(
html => \&html_quote ,
+ # HTML collapses newlines in element attributes to a single space,
+ # so form elements which may have whitespace (ie comments) need
+ # to be encoded using &#013;
+ # See bugs 4928, 22983 and 32000 for more details
+ html_linebreak => sub
+ {
+ my ($var) = @_;
+ $var =~ s/\r\n/\&#013;/g;
+ $var =~ s/\n\r/\&#013;/g;
+ $var =~ s/\r/\&#013;/g;
+ $var =~ s/\n/\&#013;/g;
+ return $var;
+ } ,
+
# This subroutine in CGI.pl escapes characters in a variable
# or value string for use in a query string. It escapes all
# characters NOT in the regex set: [a-zA-Z0-9_\-.]. The 'uri'