Last modified: 2013-09-16 23:28:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54945, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52945 - Foster-parented transclusion content not encapsulated- causes dirty diff
Foster-parented transclusion content not encapsulated- causes dirty diff
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
DOM (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Arlo Breault
:
Depends on: 53110
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-16 20:09 UTC by Gabriel Wicke
Modified: 2013-09-16 23:28 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Wicke 2013-08-16 20:09:40 UTC
Test case:
echo '<table>{{echo|foo<tr><td>bar</td></tr>}}</table>' | node parse 
WARNING: DSR inconsistency: cs/s mismatch for node: BODY s: 0; cs: -3
<body data-parsoid='{"dsr":[0,49,0,0]}'>foo<table data-parsoid='{"stx":"html","dsr":[0,48,7,8]}'><tbody about="#mwt1" typeof="mw:Transclusion" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}' data-parsoid='{"dsr":[7,40,null,null],"pi":[[{"k":"1","spc":["","","",""]}]]}'><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>bar</td></tr></tbody></table>
</body>

The foster-parented 'foo' is not marked as transclusion-affected, which will cause a dirty diff on round-trip:

echo '<table>{{echo|foo<tr><td>bar</td></tr>}}</table>' | node parse --wt2wt
WARNING: DSR inconsistency: cs/s mismatch for node: BODY s: 0; cs: -3
foo<table>{{echo|foo<tr><td>bar</td></tr>}}</table>
Comment 1 Gerrit Notification Bot 2013-09-04 18:42:42 UTC
Change 82647 had a related patch set uploaded by Arlolra:
WIP: Discard foster-parented transclusion content

https://gerrit.wikimedia.org/r/82647
Comment 2 Arlo Breault 2013-09-04 19:00:29 UTC
An edge case that I noticed here,

echo "{{echo|<table><tr>}}foo<td>bar</td></tr></table>" | node parse
echo "{{echo|<table><tr>}}<p>foo</p><td>bar</td></tr></table>" | node parse
echo "{{echo|<table><tr>foo}}<td>bar</td></tr></table>" | node parse

the transclusion info gets added to the fostered content resulting in an error,

ERROR: Do not have necessary info. to encapsulate Tpl: 0
Comment 3 Gerrit Notification Bot 2013-09-16 23:24:54 UTC
Change 82647 merged by Arlolra:
Encapsulate foster-parented transclusion content.

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links