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)

defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: blizzard, Assigned: pollmann)

References

()

Details

(Keywords: dataloss, Whiteboard: critical for 0.9.2)

Attachments

(1 file)

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.
Keywords: dataloss
Might be bug 59248 or bug 30471 or something new.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
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
oops, this should be mine
Assignee: pollmann → rods
Any progress on this one?
Pollmann agreed to look into this one, reassigning :-)
Assignee: rods → pollmann
OS: Linux → All
Hardware: PC → All
Target Milestone: Future → ---
Whiteboard: want for 0.9.2
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.
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
Attached patch patch (deleted) — Splinter Review
Nisheeth says "r=nisheeth@netscape.com"
Johnny says "sr=jst@netscape.com"
a=blizzard on behalf of drivers for 0.9.2
Whiteboard: want for 0.9.2 → critical for 0.9.2
Keywords: nsenterprise
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
verifying fixed on build 2001-06-22-06-trunk windows 98 linux RedHat 6.2 2001-06-22-06-trunk
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: