Page MenuHomePhabricator

Parsoid Rich Attributes phase 2
Open, Needs TriagePublic

Description

See https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec/Rich_Attributes

In this phase we will make limited changes to existing Parsoid markup to regularize it using the rich attributes framework. For example:

  • https://www.mediawiki.org/wiki/Specs/HTML/2.8.0#Generated_attributes_of_HTML_tags uses several representations of attribute keys and values. The general form seems to be {"txt":"<flattened content>","html":"<rich document content>"} for both keys and values, with a simple string used when the txt and html are both identical simple strings; but these appear to be used inconsistently, with components not always appearing, such as (in the documentation): {"txt":"href"},{"html":"..an html string.."}. This should be made consistent.
  • Image markup often puts expanded attributes on a different element than the attribute lives on; for example "width" and "height" are placed on the "figure" not the internal "img", and "thumbnail" that doesn't correspond to an attribute at all. These should be made consistent and/or renamed to clearly distinguish them as "virtual attributes".