mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-28 08:50:07 +00:00
Bug fixes in aboutId assignment during DOM Fragment unpacking
* isForeignContent now flags content that is not originally present in the top-level page => transclusion and extension content. During DOM fragment unpacking, top-level children of the fragment are always re-assigned the fragment wrapper's about-id. * For content that is not flagged isForeignContent (figures that are reused from cache, and all other users of dom-fragment including scoped parsing), the fragment DOM is walked and all about-ids are reassigned fresh about ids. * From an earlier patchset (now unrelated to the bug fixes here) * Renamed older badly named isEncapsulatedElt helper to isFirstEncapsulationWrapperNode. * Left behind helper to recognize when a node is an encapsulation wrapper (in case it comes handy later on). * No change in parser tests. TODO: We need a parser test with extensions in them. {{echo|<div>foo</div> <math>1+2</math> <div>bar</div>}} would not RT properly before this patch because the inner <math> node did not have the about-id as the surrounding <div>s. This patch fixes this. This should also fix a lot of the <timeline> regressions seen in latest RT testing. Change-Id: I595e9f46d8ce789a05e4b7dd8b58e443e4c02f98
This commit is contained in:
parent
a25f1e329c
commit
baccddcf7c
|
@ -306,14 +306,14 @@ References.prototype.handleReferences = function ( manager, pipelineOpts, refsTo
|
|||
};
|
||||
|
||||
cb({
|
||||
async: false,
|
||||
tokens: DU.buildDOMFragmentForTokenStream(
|
||||
refsTok,
|
||||
buf.join(''),
|
||||
manager.env,
|
||||
olProcessor,
|
||||
referencesId
|
||||
),
|
||||
async:false
|
||||
{ aboutId: referencesId, isForeignContent: true }
|
||||
)
|
||||
});
|
||||
}.bind(this);
|
||||
|
||||
|
|
Loading…
Reference in a new issue