Closed
Bug 45949
Opened 24 years ago
Closed 24 years ago
[FIX]Form: type="hidden" not submitted
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
VERIFIED
WORKSFORME
M17
People
(Reporter: alan-lists, Assigned: rods)
References
()
Details
(Keywords: compat, testcase)
Attachments
(2 files)
Windows 95, Mozilla build 7-19-00 Hidden elements like: <input type="hidden" name="test code"> Don't get submitted like NS 4.x If you need to test submit this form I can mail results back to you to see. http://www2.heifer.org/test/moz-form.htm (just don't do it to me to much :) ) That page has 3 hidden elemens that are not passed to the old stand by CGI form FORMMAIL.CGI. They are: Assigned E-Mail Account Network Account test code Netscape 4.x sends formail.cgi the 3 hidden elements thus they appear on the e-mail sent back. Mozilla does not send that information back. Thus there could be cases where information is for some types of forms being processed information could almost be invalid.
Assignee | ||
Comment 1•24 years ago
|
||
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•24 years ago
|
||
When I submit the form in the attachment from Nav 4.x the post looks like this: http://pollmann.net/echo.cgi?myhidden1=++&myhidden2=++ When I submit the form in the attachment from Moz the post looks like this: http://pollmann.net/echo.cgi?myhidden1=&myhidden2=
Assignee | ||
Comment 3•24 years ago
|
||
Here is the diff for the fix:
Index: nsFormFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/forms/src/nsFormFrame.cpp,v
retrieving revision 3.122
diff -r3.122 nsFormFrame.cpp
1092,1094c1092,1102
< nsString* convValue = URLEncode(newValue, encoder);
< buf += *convValue;
< delete convValue;
---
> PRInt32 type;
> child->GetType(&type);
> if (NS_FORM_INPUT_HIDDEN == type && newValue.Length() == 0) {
> nsAutoString empty;
> empty.AssignWithConversion("++");
> buf += empty;
> } else {
> nsString* convValue = URLEncode(newValue, encoder);
> buf += *convValue;
> delete convValue;
> }
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → M17
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
As can be seen by the attachements, Mozilla is currently acting as per the standards. Sending "++" is wrong if the value is "" (or not specified). Marking WORKSFORME, tested with Mozilla and Commerical bits 2000072120 on Win2k. Alan: Please reopen this if you still have the problem in the latest builds, this time including a minimised test case. I would suggest the problem may be with your server side script.
Comment 6•24 years ago
|
||
Incidentally, I examined the issue a bit closer (since Alan asked me to) and discovered the following: 1. IE does it like Mozilla, so we do not have a legacy to support. 86% market share and all that... ;-) 2. The script in question, formmail.pl (available from http://www.worldwidemart.com/scripts/ ...) is actually explicitly looking for empty values to not include them. 3. According to the standards (HTML), we should NOT be returning " " when the value is "".
Keywords: verifyme
Reporter | ||
Comment 7•24 years ago
|
||
yup, stupid Netscape thing compaired to other platforms marking verifed works
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•