Open
Bug 474376
Opened 16 years ago
Updated 2 years ago
Trying to set .innerHTML to invalid markup in XHTML causes content to be blank
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: BijuMailList, Unassigned)
Details
(Keywords: html5)
Attachments
(2 files)
647 bytes,
application/xhtml+xml
|
Details | |
2.52 KB,
patch
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #466751 +++
Trying to set .innerHTML to invalid markup in XHTML causes content to be blank
Steps:-
1. Ensure javascript is turned on
2. goto attachment 350091 [details]
Result:-
user see "This is a . In Firefox, expect an exception."
Expected:-
user see "This is a test. In Firefox, expect an exception."
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre)
Gecko/20090118 Minefield/3.2a1pre
Comment 1•16 years ago
|
||
Same as 460437? There should be a test for this that should fail.
test case
(In reply to comment #1)
> Same as 460437? There should be a test for this that should fail.
bug 460437 looks like we are unable to find node if error occurs.
Which is fixed, but now only the innerHTML content is blank.
Comment 3•16 years ago
|
||
I don't see how this is related to bug 474376. This bug existed before then as far as I can tell, and is caused by us clearing out the childNodes before actually parsing the innerHTML:
http://mxr.mozilla.org/mozilla1.9.1/source/content/html/content/src/nsGenericHTMLElement.cpp?mark=721,739#711
No longer depends on: 466751
Comment 4•16 years ago
|
||
(In reply to comment #3)
> I don't see how this is related to bug 474376.
Er, I meant bug 466751 of course.
Comment 6•16 years ago
|
||
http://www.whatwg.org/specs/web-apps/current-work/#innerhtml
It raises an exception if the XML parser has a well-formedness error.
I understand as follows.
Step 1. do the parsing so it will be erroring out at Step 1.
And the removal of existing child nodes are at Step 3. which will never executed.
Hence we should retain the existing content and
attachment 350091 [details] should display
"This is a test. In Firefox, expect an exception."
And when assigning to Document element on error if the document was in parsing state we should continue parsing the original document.
Comment 8•15 years ago
|
||
Comment 9•15 years ago
|
||
I have to add a test for comment #6
Reporter | ||
Comment 10•15 years ago
|
||
Comment on attachment 425766 [details] [diff] [review]
patch
jst are you a reviewer? if not pl. change to the right person
Attachment #425766 -
Flags: review?(jst)
Comment 11•12 years ago
|
||
Comment on attachment 425766 [details] [diff] [review]
patch
Clearing out old reviews. If this is still relevant, please re-request review for this patch.
Attachment #425766 -
Flags: review?(jst)
Comment 12•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•