Closed
Bug 84499
Opened 23 years ago
Closed 23 years ago
option values in select lists with trailing whitespace in quotes has whitespace removed
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: blizzard, Assigned: pollmann)
References
()
Details
(Keywords: dataloss, Whiteboard: critical for 0.9.2)
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
Build is on June 7, 2001.
If you have a bit of html like this:
<select name="test"><option value="1234 ">1234</option></select>
The value of test as submitted to the server is '1234' not '1234++++' as it
should be. Netscape 4.x and IE get this right.
The most serious place I've seen this problem is fleet bank's online banking
login page. You can save your card number and it includes the trailing spaces.
Mozilla truncates the spaces.
Comment 1•23 years ago
|
||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 2•23 years ago
|
||
Mass move of form submission bugs, Eric, I am sorry I don't have more time to
look at these closer.
Assignee: rods → pollmann
Status: ASSIGNED → NEW
Reporter | ||
Comment 4•23 years ago
|
||
Any progress on this one?
Comment 5•23 years ago
|
||
Pollmann agreed to look into this one, reassigning :-)
Assignee: rods → pollmann
OS: Linux → All
Hardware: PC → All
Target Milestone: Future → ---
Reporter | ||
Updated•23 years ago
|
Whiteboard: want for 0.9.2
Reporter | ||
Comment 6•23 years ago
|
||
pollman, is there anything I can do to help? Give me a pointer of a chunk of
code to start looking and I'll do the initial investigation for you.
Assignee | ||
Comment 7•23 years ago
|
||
Oh, sorry - the problem is here:
PRBool
nsListControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
nsString* aValues, nsString* aNames)
{
...
GetOptionValue(*options, mSelectedIndex, value);
value.CompressWhitespace();
...
This code was added for this case:
<select name=sel>
<option>foo
</select>
GetOptionValue will return "foo\r\n" this case, and CompressWhitespace strips
off all leading and trailing whitespace. I think the fix is to be more specific
in which cases we strip whitespace, perhaps only when GetOptionValue gets the
value from the text content inside an option? I'm looking into what IE, Nav
4.x, and Netscape 6 did in all the various permutations of these cases...
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
Assignee | ||
Comment 8•23 years ago
|
||
Assignee | ||
Comment 9•23 years ago
|
||
Nisheeth says "r=nisheeth@netscape.com"
Assignee | ||
Comment 10•23 years ago
|
||
Johnny says "sr=jst@netscape.com"
Reporter | ||
Comment 11•23 years ago
|
||
a=blizzard on behalf of drivers for 0.9.2
Whiteboard: want for 0.9.2 → critical for 0.9.2
Keywords: nsenterprise
Assignee | ||
Comment 12•23 years ago
|
||
Fix checked in. To verify:
View http://www.ideasuite.com/~blizzard/test/test.html
Click Submit Query
The result should be:
"1234 "
Note that a space must follow the 4. You should also verify that the URL bar is
now:
http://www.ideasuite.com/~blizzard/test/test.cgi?test=1234++++
The four trailing + signs here are the indication that the bug was fixed.
Thanks!
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 13•23 years ago
|
||
verifying fixed on build 2001-06-22-06-trunk windows 98
linux RedHat 6.2 2001-06-22-06-trunk
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•