mediawiki-extensions-Cite/lib
Subramanya Sastry 381ceda257 T93580: Handle <ref>s in inline image captions
Inline images don't display their captions and don't have a
DOM structure for them. They are hidden away in the data-mw
attribute.

So far, we weren't handling <ref>s embedded in these inline
image captions -- both causing rendering diffs in the references
section and crashing the serializer when these nodes were
encountered.

This patch fixes that and also adds parser tests.
The html2html failure added to the blacklist is because of
about-id mismatches in the embedded html. We need smarter
normalization in parserTests.js to remove these false failures.

There is also a long comment about generalizing how this kind
of scenario is handled. Worth tackling that in a separate patch.
In order to simplify and generalize the adhoc nature of
trace output that is currently in place, I had been pondering
creating a DOMProcessor class with state to do that, and
looks like something like will help with this as well.
For this patch, I am leaving behind the special case handling.
Adding state and generalizing how embedded HTML is processed
should be done separately since that requires more thinking
and experimentation.

enwiki/High_Laver?oldid=659441291 and hiwiki/मुक्केबाज़ी?oldid=2689792
now RT without crashers.

Change-Id: I39854c7b5b3e8d7cce84b1b4e05213185f8cccb0
2015-09-04 15:07:41 -05:00
..
ext.Cite.js T93580: Handle <ref>s in inline image captions 2015-09-04 15:07:41 -05:00