Closed
Bug 63559
Opened 24 years ago
Closed 24 years ago
DOMParser loses HTML element attributes
Categories
(Core :: XML, defect, P2)
Core
XML
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)
Details
(Keywords: dataloss, Whiteboard: [fixinhand])
Attachments
(4 files)
6.14 KB,
patch
|
Details | Diff | Splinter Review | |
6.20 KB,
patch
|
Details | Diff | Splinter Review | |
211 bytes,
text/xml
|
Details | |
632 bytes,
text/html
|
Details |
When parsing an XML document that contains HTML elements, we lose attributes on
the HTML elements. We get an assertion that attribute stylesheet could not be
loaded (which is needed to add those attributes).
Assignee | ||
Updated•24 years ago
|
Priority: -- → P2
Target Milestone: --- → mozilla0.8
Assignee | ||
Comment 1•24 years ago
|
||
I will not be able to check this in for 0.8, moving to 0.9.
Target Milestone: mozilla0.8 → mozilla0.9
Assignee | ||
Comment 2•24 years ago
|
||
Assignee | ||
Comment 3•24 years ago
|
||
I am not completely sure this is the right fix yet, but at least it *seems* to
work. We still try to set the attributes via the stylesheet, but if we do not
get a stylesheet we use the alternative method. It used to be so that if there
was no document we'd use the alternative method.
Status: NEW → ASSIGNED
Whiteboard: [fixinhand]
Assignee | ||
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
The last patch looks good to me. r=jst
Comment 6•24 years ago
|
||
Looks good to me as well - sr=vidur. I'm not sure I understand why
nsHTMLUnknownElement doesn't use the generic SetAttribute, but that's a
different issue.
Comment 7•24 years ago
|
||
This patch didn't work for me when loading an XHTML document using document.load().
Here's a testcase
http://www.ece.rice.edu/~brentmh/swi/js/test.html
--Brent
Assignee | ||
Comment 8•24 years ago
|
||
Assignee | ||
Comment 9•24 years ago
|
||
Assignee | ||
Comment 10•24 years ago
|
||
My sample that I just attached (slightly modified from your version) works fine.
Maybe the problem is with your testcase, or maybe it is because your testcase
uses unknown namespace (not XHTML).
Assignee | ||
Comment 11•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•