WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#41183 closed defect (bug) (invalid)

Type attribute for <ol> is not supported in TinyMCE in WP 4.8

Reported by: theideamechanic Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: TinyMCE Keywords:
Focuses: Cc:

Description

Refer to ā€‹https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol

If <ol type="a"><li>test</li><ol> is entered into the text area of TinyMCE in either post, page, or widget text editor of a plain WP 4.8 site (regardless of the theme - fails with 2017), it resolves to "1. test" rather than "a. test". The attributes "reversed" and "start" do seem to be recognized.

I have not tested this with previous WP versions.

Doug Foster
doug@ā€¦

Change History (3)

#1 @swissspidy
3 years ago

Works without a problem here. The type attribute is allowed in $allowedposttags and thus not stripped from the output or the visual editor.

What you see might be theme-related. For example, Twenty Seventeen sets ol { list-style: decimal; } in its CSS, which naturally overrides the type attribute. Without that definition, the type attribute works as expected.

#2 @theideamechanic
3 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Thank you for the quick response and the explanation. I verified the 2017 theme CSS rule ol { list-style: decimal; } was there and over-rode the html type attribute. I _never_ would have thought to look for that (but I should have).

Iā€™m surprised that this year's featured WP theme would include a style that (while technically correct) could be easily misinterpreted as a defect.

Guess next time I need to troubleshoot using a bare-bones theme with just a reset. :-)

Thank you, let's close the ticket.

#3 @swissspidy
3 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.