Closed Bug 82544 Opened 25 years ago Closed 25 years ago

First and last quotes in value fields are being ignored

Categories

(Core :: DOM: HTML Parser, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: a.c.r.martin, Assigned: harishd)

References

()

Details

(Keywords: dataloss, Whiteboard: [fix in hand])

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.14-5.0 i686; en-US; rv:0.9) Gecko/20010505 BuildID: 2001050521 If a <form> has a <select> containing <option>s of the form: <option value="'somevalue'"> then the single inverted commas are not sent using the GET method. This works fine under Netscape 4.xx and MIE Reproducible: Always Steps to Reproduce: 1. Goto http://www.rubic.rdg.ac.uk/cgi-bin/AndrewMartin/xslt.pl?src=antibodies.xml&xsl=summary.xsl 2. Choose an item from the 'Sort By' pull-down select 3. Click 'sort' 4. Examine the resulting URL Actual Results: The resulting URL from the GET-method form looks like: http://www.rubic.rdg.ac.uk/cgi-bin/AndrewMartin/xslt.pl?src=antibodies.xml&xsl=summary.xsl&params=%24sortkey%3Dpdb (where %24 is the code for $ and %3D is the code for =) Expected Results: http://www.rubic.rdg.ac.uk/cgi-bin/AndrewMartin/xslt.pl?src=antibodies.xml&xsl=summary.xsl&params=%27%24sortkey%3Dpdb%27 (where %24 is the code for $ %3D is the code for = and %27 is the code for ')
reassigning
Assignee: rods → pollmann
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is a parser bug. It reads value="'foo'" as value=foo but if you have a single quote like "'foo" is read as 'foo It only happens if the single and double quotes are adjacent. Neither Netscape 4 nor IE have this behaviour.
Component: Form Submission → Parser
Attached file testcase
*** Bug 82564 has been marked as a duplicate of this bug. ***
changing summary, adding keywords from duplicate
Keywords: dataloss
Summary: single inverted commas in select/option form element not sent → First and last quotes in value fields are being ignored
Over to the parser guru... (Thanks Harish!)
Assignee: pollmann → harishd
This is trivial to fix.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
Attached patch patch v1.1Splinter Review
Whiteboard: [fix in hand]
Hallelujah! The parser's finally doing its job and stripping the quotes out. This was a point of contention prior to Mozilla 0.6. r/sr=vidur.
vidur@netscape.com said: >Hallelujah! The parser's finally doing its job and stripping the quotes out. Surely that cannot be the right behaviour. If my HTML says <option value="'somevalue'"> then surely it is obvious that the single inverted commas must be part of what is assigned to 'value' ! As stated in the duplicate bug post (82564), this is data loss.
a.c.r.martin@rdg.ac.uk: I think he meant that the parser strips the outer quotes so that the content sink doesn't have to do it any more. There is a performance patch/rewrite of this function in bug 83945 which copies the old behaviour which apparently isn't correct. So the right thing is: | foo | -> |foo| | ' foo ' | -> |' foo '| ? I'm marking that bug as dependent of this and will rework it when this is in.
Blocks: 83945
*** Bug 85805 has been marked as a duplicate of this bug. ***
a= asa@mozilla.org for checkin to the trunk. (on behalf of drivers)
Blocks: 83989
Fix is in.
Fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verifying fixed on windows 98 build 2001-06-21-04-trunk and build 2001-06-20-21-trunk linux redhat
Status: RESOLVED → VERIFIED
*** Bug 87329 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: