Summary: on text page document.body.innerHTML='' acts strange. → On text/plain page, document.body.innerHTML='' acts strange.
createContextualFragment assumes it's actually going to be parsed as markup. We should probably make innerHTML throw in documents that are nsHTMLDocument but not text/html.
Component: DOM → DOM: Mozilla Extensions
Perhaps we should just blacklist text/plain instead of whitelisting both text/html and */*xml* (or however you describe the millions of XHTML content types).
Created attachment 281031 [details] [diff] [review] So like this
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #281031 - Flags: review?(bzbarsky)
Note that if the blacklisting were in CreateContextualFragment it would be trivial to limit to non-HTML HTMLDocuments.
Comment on attachment 281031 [details] [diff] [review] So like this See comment 4
Attachment #281031 - Flags: review?(bzbarsky) → review-
This is a mass change. Every comment has "assigned-to-new" in it. I didn't look through the bugs, so I'm sorry if I change a bug which shouldn't be changed. But I guess these bugs are just bugs that were once assigned and people forgot to change the Status back when unassigning.
Status: ASSIGNED → NEW
Component: DOM: Mozilla Extensions → DOM
Product: Core → Core
This seems to work fine these days. And I don't think we need to change how the API works based on the document content type.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.