Page MenuHomePhabricator

Replace deprecated HTML tags in HTML5
Closed, InvalidPublic

Description

Like it is done for deprecated attributes (function fixDeprecatedAttributes in Sanitizer.php), deprecated HTML tags should be replaced by CSS, too.

These tags are (see URL):

  • big
  • center
  • font
  • strike
  • tt

For big, strike and tt this should be easy. font requires the obsolete attributes to be converted to CSS.
I'm not sure, whether it is actually possible to replace center,

<center><table><tr><td>a</td></tr></table></center>

centers the table (tested in Firefox), but something like

<div style="text-align:center; margin-left:auto; margin-right:auto;"><table><tr><td>a</td></tr></table></div>

doesn't.

The changed tags should be given an extra CSS class in order to be able to address them using CSS.


Version: unspecified
Severity: enhancement
URL: http://www.w3.org/TR/2012/WD-html5-diff-20120329/#obsolete-elements
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=40632

Details

Reference
bz39614

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
InvalidNone

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:06 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz39614.
bzimport added a subscriber: Unknown Object (MLST).

To center a table:
style="margin: 1em auto 1em auto;"

Marking this as invalid since $wgCleanupPresentationalAttributes was removed on
Change-Id: I4e86305520a3b22ef88381caab55d24abac932e3
(per bug 40632).