Closed Bug 159842 Opened 22 years ago Closed 22 years ago

parser has no mechanism to allow parsing of incomplete html fragments

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: mozeditor, Assigned: mozeditor)

References

Details

(Whiteboard: [EDITORBASE+]; fixinhand edt_x3)

Attachments

(3 files, 2 obsolete files)

There is no way for a client of the parser to communicate to the dtd, via the parser, that it wants to parse a fragment of html that may not have all required parents. /for example, if you wish to parse a fragment that has tr's and td's but no table, the dtd will drop the table substructre on the floor. This causes problems with copy/paste. Attaching a fix soon. I'll mark ths as a blocker of some other bugs once I track them down.
Status: NEW → ASSIGNED
Whiteboard: [EDITORBASE]; fixinhand
Target Milestone: --- → M1
Attached patch parser patch (obsolete) (deleted) — Splinter Review
Attached patch take #2 (obsolete) (deleted) — Splinter Review
first patch not quite intrusive enough.
Attachment #93105 - Attachment is obsolete: true
Keywords: nsbeta1+
Whiteboard: [EDITORBASE]; fixinhand → [EDITORBASE+]; fixinhand
What's the status of this patch and the one in bug 94176 (blocked by this one)? Are you waiting for reviews, or do the patches need further work?
Attached patch take #3 (deleted) — Splinter Review
This includes some missing header file changes from prior patch, and also updates content to have a CID/ContractID/Factory method for the HTMLFragmentSink, which is the sink most folks would want to use with the parser when they are parsing an html fragment.
Attachment #93396 - Attachment is obsolete: true
ooops, forgot to add content changes. hold the phone....
This does not obsolete the prior patch. Use both.
Attached patch parser diffs ignoring ws (deleted) — Splinter Review
This is the same diff as "take #3", but ignoring whitespace to aid reviewers. There is a lot of gobbledeegook in "take#3" that is really just diff getting confused by a bunch of lines that were indented to be inside a new "if" block.
marking bugs blocked by this
Blocks: 94176, 142855
Comment on attachment 96474 [details] [diff] [review] parser diffs ignoring ws r=heikki, with the suggestion that you make SetCommand(const char*) also recognize the new command. It would be great if you could run the parser regression tests before checkin in (command line tool, see README in htmlparser/tests/html). Although I have to say this patch alone looks pretty safe. Also, if this is not terribly urgent I would advice you to wait till Monday to get sr from bzbarsky (I think he had something to do with fragment suff).
Attachment #96474 - Flags: review+
Comment on attachment 96474 [details] [diff] [review] parser diffs ignoring ws sr=bzbarsky if you make NS_FRAGMENTSINK_CONTRACTID be NS_HTMLFRAGMENTSINK_CONTRACTID (because we may have an XML fragment sink at some point soonish)
Attachment #96474 - Flags: superreview+
Comment on attachment 96376 [details] [diff] [review] content changes to export the HTML Fragment Sink sr=bzbarsky
Attachment #96376 - Flags: superreview+
fix (with suggested tweaks from reviewers) landed on trunk. qa: i suggest verifying this by testing 94176. If that's fixed, this is fixed.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Please verify this bug based on comment #12
Whiteboard: [EDITORBASE+]; fixinhand → [EDITORBASE+]; fixinhand edt_x3
per Joe's comment #12: I tested and verified bug 94176, so I am also marking this verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: