Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
603921c6
Commit
603921c6
authored
Jul 19, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 157074 - verify-new-product doubles comment linefeeds on Win32
r=myk, jouni
parent
42c44b90
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
4 deletions
+18
-4
checksetup.pl
checksetup.pl
+1
-0
globals.pl
globals.pl
+14
-0
process_bug.cgi
process_bug.cgi
+0
-3
004template.t
t/004template.t
+1
-0
hidden-fields.html.tmpl
template/en/default/global/hidden-fields.html.tmpl
+2
-1
No files found.
checksetup.pl
View file @
603921c6
...
...
@@ -892,6 +892,7 @@ END
strike
=>
sub
{
return
$_
;
}
,
js
=>
sub
{
return
$_
;
},
html
=>
sub
{
return
$_
;
},
html_linebreak
=>
sub
{
return
$_
;
},
url_quote
=>
sub
{
return
$_
;
},
},
})
||
die
(
"Could not create Template: "
.
Template
->
error
()
.
"\n"
);
...
...
globals.pl
View file @
603921c6
...
...
@@ -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'
...
...
process_bug.cgi
View file @
603921c6
...
...
@@ -959,9 +959,6 @@ foreach my $id (@idlist) {
$vars
->
{
'start_at'
}
=
$::FORM
{
'longdesclength'
};
$vars
->
{
'comments'
}
=
GetComments
(
$id
);
$::FORM
{
'comment'
}
=~
s/\r\n/\n/g
;
# Get rid of windows-style line endings.
$::FORM
{
'comment'
}
=~
s/\r/\n/g
;
# Get rid of mac-style line endings.
$::FORM
{
'delta_ts'
}
=
$delta_ts
;
$vars
->
{
'form'
}
=
\%::
FORM
;
...
...
t/004template.t
View file @
603921c6
...
...
@@ -77,6 +77,7 @@ my $template = Template->new(
# See globals.pl for the actual codebase definitions.
FILTERS
=>
{
html_linebreak
=>
sub
{
return
$_
;
},
js
=>
sub
{
return
$_
}
,
strike
=>
sub
{
return
$_
}
,
url_quote
=>
sub
{
return
$_
}
,
...
...
template/en/default/global/hidden-fields.html.tmpl
View file @
603921c6
...
...
@@ -28,5 +28,6 @@
[%# Generate hidden form fields for non-excluded fields. %]
[% FOREACH field = form %]
[% NEXT IF exclude && field.key.search(exclude) %]
<input type="hidden" name="[% field.key %]" value="[% field.value FILTER html %]">
<input type="hidden" name="[% field.key %]"
value="[% field.value | html | html_newline %]">
[% END %]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment