Nested ordered list gets corrupted
-
Hi,
Can you please advise what is wrong with the code below:
<ol>
<li>
<ol>
<li>item 1a</li>
<li>item 1b</li>
<li>item 1c</li>
<li>item 1d</li>
<li>item 1e</li>
<li>item 1f</li>
</ol>
</li>
<li>
<ol>
<li>item 2a</li>
<li>item 2b</li>
<li>item 2c</li>
<li>item 2d</li>
</ol>
</li>
</ol>`This should produce the following result:
1.
a. item 1a
b. item 1b
c. item 1c
d. item 1d
e. item 1e
f. item 1f
2.
a. item 2a
b. item 2b
c. item 2c
d. item 2dAnd it does. However, when I place this on my page and edit the items – like deleting the word “item” from one of the lines, the outer numbering disappears. The code gets changed to this:
<ol>
<li style="list-style-type: none;">
<ol>
<li>item 1a</li>
<li>item 1b</li>
<li>1c</li>
<li>item 1d</li>
<li>item 1e</li>
<li>item 1f</li>
</ol>
<ol>
<li>item 2a</li>
<li>item 2b</li>
<li>item 2c</li>
<li>item 2d</li>
</ol>
</li>
</ol><li style="list-style-type: none;">gets added, producing:a. item 1a
b. item 1b
c. 1c
d. item 1d
e. item 1e
f. item 1f
a. item 2a
b. item 2b
c. item 2c
d. item 2dThis happens consistently and can be reproduced even with Advanced Editor Tools (previously TinyMCE Advanced) and Classic Editor deactivated, meaning it is not an issue related to these plugins.
Is this a core WordPress issue? Is there a way to prevent his happening as it is quite frustrating.
I hope this is the right forum.
Thanks for any help
The topic ‘Nested ordered list gets corrupted’ is closed to new replies.