Page MenuHomePhabricator

Remove embedded HTML from data-parsoid
Open, Needs TriagePublic

Description

The DOMFragment token serialization currently stores embedded HTML in data-parsoid.html, which in turn means we need to load data-parsoid (which is present on almost every node) whenever we do a traversal including attribute-embedded HTML.

We *could* move this to a special internal attribute (like data-parsoid-domfragment) but given that data-mw already contains a number of embedded HTML values (like caption) we might as well just add it there. We could split data-mw up further in the future if we wanted found that we were loading too many attributes just looking for embedded HTML, but data-mw is already on fewer nodes that data-parsoid.

Event Timeline

Change #1298337 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/services/parsoid@master] Move DOMFragment tunnel from DataParsoid::$html to DataMw::$fragmentHtml

https://gerrit.wikimedia.org/r/1298337

Change #1298350 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/Cite@master] Don't mutate the DocumentFragment when comparing its HTML

https://gerrit.wikimedia.org/r/1298350