From a8be3ad6e49a1a6708d4496671e77dea3c548d6e Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Tue, 19 Feb 2019 13:05:10 -0500 Subject: [PATCH] Fix crasher in cite extension from accessing data after it's stored Follow up to b0f2adc Change-Id: I840924ba1ba1b7af963d541c2cb6619543fbe69d --- lib/ext/Cite/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js index d1730ddc9..ad0ad8696 100644 --- a/lib/ext/Cite/index.js +++ b/lib/ext/Cite/index.js @@ -102,7 +102,9 @@ Ref.prototype.serialHandler = { // n.b. this is going to drop any diff markers but since // the dom differ doesn't traverse into extension content // none should exist anyways. - html = ContentUtils.ppToXML(bodyElt, { innerXML: true }); + DOMDataUtils.visitAndStoreDataAttribs(bodyElt); + html = ContentUtils.toXML(bodyElt, { innerXML: true }); + DOMDataUtils.visitAndLoadDataAttribs(bodyElt); } else { // Some extra debugging for VisualEditor var extraDebug = '';