Closed
Bug 47454
Opened 26 years ago
Closed 25 years ago
Mozilla incorrectly removes quotes from attribute values
Categories
(Core :: DOM: HTML Parser, defect, P3)
Core
DOM: HTML Parser
Tracking
()
VERIFIED
FIXED
People
(Reporter: peter.vanderbeken, Assigned: nisheeth_mozilla)
Details
Mozilla removes quotes from attribute values. This causes severe problems for
Transformiix, because we don't get the exact attribute value. For example, given
<xsl:if test="'a'='b'" /> the attribute value of the test attribute ends up as
a'='b which is complete nonsense for Transformiix, it should have been 'a'='b'.
This is caused by the following code (see http://lxr.mozilla.org/mozilla/source/
layout/xml/document/src/nsXMLContentSink.cpp#419) in
nsXMLContentSink::GetAttributeValueAt:
419 // Strip quotes if present
420 PRUnichar first = aResult.First();
421 if ((first == '\"') || (first == '\'')) {
422 if (aResult.Last() == first) {
423 aResult.Cut(0, 1);
424 PRInt32 pos = aResult.Length() - 1;
425 if (pos >= 0) {
426 aResult.Cut(pos, 1);
427 }
428 } else {
429 // Mismatched quotes - leave them in
430 }
431 }
I don't know why we do this, but it seems wrong to me. This code is also in
nsHTMLContentSink BTW.
| Reporter | ||
Updated•26 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Triaging Rickg's buglist:
---------------------------
Nisheeth, this could be your bug. CCing myself.
Assignee: rickg → nisheeth
| Reporter | ||
Comment 2•25 years ago
|
||
Fix checked in a while ago (9/2/2000).
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Marking verified as per above developer comments.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•