Page MenuHomePhabricator

fixDeprecatedAttributes incorrectly converts the type attribute of lists and list items
Closed, ResolvedPublic

Description

includes/Sanitizer.php includes the following line in the function fixDeprecatedAttributes(), introduced in r94465:

'type' => array( 'list-style-type', array( 'li', 'ol', 'ul' ) ),

There are two problems here:

  1. In HTML5, the type attribute is NOT deprecated for ol elements.
  1. This line fails to make the following substitutions:

    "1" with "decimal" "a" with "lower-alpha" "A" with "upper-alpha" "i" with "lower-roman" "I" with "upper-roman"

Consequently, pages such as Wikipedia:Text of Creative Commons Attribution-ShareAlike 3.0 Unported License on the English Wikipedia do not render correctly when both $wgHtml5 and $wgCleanupPresentationalAttributes are enabled. As of revision 505139539, the subsections of that page are numbered with Arabic numerals, rather than with lowercase letters as they should be.


Version: 1.21.x
Severity: normal
URL: https://en.wikipedia.org/w/index.php?title=Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License&oldid=505139539

Details

Reference
bz41018

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:47 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz41018.
bzimport added a subscriber: Unknown Object (MLST).

The problematic code was entirely removed in both master and MediaWiki 1.20.1, so I can close this bug now.

  • This bug has been marked as a duplicate of bug 40632 ***