Closed
Bug 72603
Opened 23 years ago
Closed 23 years ago
Form manager captures bad values for sample2 page
Categories
(Toolkit :: Form Manager, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: morse, Unassigned)
References
()
Details
Attachments
(2 files)
924 bytes,
patch
|
Details | Diff | Splinter Review | |
932 bytes,
patch
|
Details | Diff | Splinter Review |
From menu select tasks->privacy->form-manager->demo Click on sample 2 Enter a value in any text field (e.g., First Name) From menu select edit->save-form-data From menu select edit->prefill-form At this point you will get a preview dialog showing the values that are going to get prefilled. The FirstName value is there and is correct. But there are also values for Card.Type, Card.Exp.Month, and Card.Exp.Year and these values are all bogus (consist of line-feeds and spaces and nothing else).
Reporter | ||
Comment 1•23 years ago
|
||
Problem here is in the following html: <select name="Card.Type"> <option value=""> </option> <option value="V"> Visa </option> <option value="MC"> MasterCard </option> </select> Assume that the last option (master card) is selected. Form manager will capture both the option value ("MC") and the option text ("MasterCard") so as to maximize the likelyhood of finding an appropriate value in a select list on some other page that it is asked to prefill. Unfortunately the option text is written across several lines. When form manager does a call to GetText, it gets all the text between the <option> and </option> tags, including the linefeeds and leading spaces. And if the first option (blank) is selected in the example above, the linefeeds and spaces are all it gets. So we need to trim away leading and trailing linefeeds and spaces before capturing the text. Attaching a patch that does just that.
Reporter | ||
Comment 2•23 years ago
|
||
Reporter | ||
Comment 3•23 years ago
|
||
Comment 4•23 years ago
|
||
r=jag
Reporter | ||
Comment 5•23 years ago
|
||
cc'ing alecf for super review
Reporter | ||
Comment 6•23 years ago
|
||
cc'ing alecf for super review
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
Comment 7•23 years ago
|
||
easy enough. sr=alecf
Reporter | ||
Comment 8•23 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Assignee: morse → nobody
Product: Core → Toolkit
QA Contact: tpreston → form.manager
Target Milestone: mozilla0.9 → ---
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•