Page MenuHomePhabricator

VisualEditor: MWTemplateNode should serialize original HTML if unchanged
Closed, ResolvedPublic

Description

If we get an MWTemplateNode and the user doesn't change it, then in the data->DOM conversion we should serialize it back out the way it came in, including all the other nodes (the template contents) that we normally discard.

Discarding these nodes when the user did change the template (i.e. the attributes changed) is fine and encouraged, but if we also do it when nothing changed, Parsoid's DOM diff algorithm will notice that we changed something in the DOM, causing selective serialization not to skip the template while it should.


Version: unspecified
Severity: normal

Details

Reference
bz47394