Closed Bug 1645330 Opened 4 years ago Closed 4 years ago

Second level ordered lists are inserted wrong

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 54479

People

(Reporter: nONoNonO, Unassigned)

References

Details

Attachments

(1 file)

When you create an ordered list with two levels, the generated HTML is wrong, causing wrong numbering:

1. One
	1. One
	2. Two
2. Three

The generated HTML is as follows:

<li>One</li>
<ol>
	<li>One</li>
	<li>Two</li>
</ol>
<li>Three</li>

According to w3c's HTML Validator this syntax is invalid:
Error: Element ol not allowed as child of element ol in this context. (Suppressing further errors from this subtree.)

When you edit the HTML and move the </li> closing tag after the sublist, numbering is correct:

<li>One
	<ol>
		<li>One</li>
		<li>Two</li>
	</ol>
</li>
<li>Two!</li>

Notice that when you add the 2nd level to the 2nd item, numbering is correct, although the HTML is still invalid:

1. One
2. Two
	1. One
	2. Two
3. Three

Bug 1548753 territory, but that's more the browser handling side of it.

I'm surprised to hear that Editor actually produces invalid HTML, and the resulting broken lists can be a big problem for Thunderbird.
So who is going to fix Editor so that it produces valid HTML?
Wayne, which product/component would Editor bugs go into?

Flags: needinfo?(vseerror)
See Also: → 1548753

I'd be surprised if this isn't a duplicate

Component: Message Compose Window → DOM: Editor
Flags: needinfo?(vseerror)
Product: Thunderbird → Core

(In reply to Wayne Mery (:wsmwk) from comment #2)

I'd be surprised if this isn't a duplicate

Of course, you are right! Thanks.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

K, and the displaying of the wrong numbering of the invalid html is indeed related to bug 1548753. I notice that when I add a third item to the sublist of the 2nd example the last item is also numbered 4. instead of 3.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: