From 603921c6defa74ef95318c14323a18cf26f3a390 Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Fri, 19 Jul 2002 21:03:51 +0000 Subject: Bug 157074 - verify-new-product doubles comment linefeeds on Win32 r=myk, jouni --- globals.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'globals.pl') 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 + # See bugs 4928, 22983 and 32000 for more details + html_linebreak => sub + { + my ($var) = @_; + $var =~ s/\r\n/\ /g; + $var =~ s/\n\r/\ /g; + $var =~ s/\r/\ /g; + $var =~ s/\n/\ /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' -- cgit v1.2.3-24-g4f1b