Closed Bug 41744 Opened 25 years ago Closed 25 years ago

editor can create non-compliant html documents

Categories

(Core :: DOM: Editor, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mozeditor, Assigned: mozeditor)

Details

(Whiteboard: [nsbeta2+]fix in hand)

In composer, type a line of text. Make it "pre". Hit return and type a line of text. Make that line "Paragraph". Now examine the html: the paragraph is a child of the pre. This is illegal html. This is a generic bug that can be reproduced with other blocks in the paragraph format popup as well.
nominating for nsbeta2; accepting; m16
Status: NEW → ASSIGNED
Keywords: nsbeta2
Target Milestone: --- → M16
adding eta.
Whiteboard: ETA: 6/8/00
totally agree -- this needs to be fixed, if not then we will totally screw up someones document.
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: ETA: 6/8/00 → [nsbeta2+]ETA: 6/8/00
Whiteboard: [nsbeta2+]ETA: 6/8/00 → [nsbeta2+]ETA: 6/9/00
Looks like this is a dtd bug. The html dtd is telling me that it's ok to put a <p> inside a <pre>, even though it isn't ok.
line 951 of nsElementTable.cpp is the culprit here. Rick even has a comment in the code saying <pre> should only contain inlines, but that he is allowing flow a the moment. I don't know why.
fix in hand
Whiteboard: [nsbeta2+]ETA: 6/9/00 → [nsbeta2+] fix in hand
M16 has been out for a while now, these bugs target milestones need to be updated.
talked to harish and he said that weird pre behavior is needed in the transitional dtd. Solution for this bug is for editor to use strict dtd on new documents. Harish has exposed a way for me to get the dtd from the doctype, so we should be able to honor doctypes.
Whiteboard: [nsbeta2+] fix in hand → [nsbeta2+]6/28/00
going to strict dtd will also fix bug 43005
moving over to m17, adjusted priority and severity
Severity: major → critical
Priority: P3 → P1
Target Milestone: M16 → M17
I'm a moron. My comments about the editor moving to strict dtd use are bogus. Getting the strict containment rules would be great, but the other effect is that we would lose deprecated tags that we depend on, like <u> and <font>. So instead I am just going to special case the editors bottleneck call through to CNavDTD to specifically override those aspects of the dtd that are problematic. Sigh. Not as pretty a solution. What we really need is our own dtd to use for new documents: one that allows deprecated tags, so that we can make docs that are most compatble with older clients; and yet one that only allows the strict containment rules, so that we dont write atrocious html, like putting <hline> inside <b>, or <p> inside <pre>, etc...
Whiteboard: [nsbeta2+]6/28/00 → [nsbeta2+]fix in hand
fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
verified in 7/5 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.