From 5a5ff8728637974d54eb56bbf25682f76f56ed8a Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Fri, 5 Mar 2010 16:19:12 -0600 Subject: [PATCH] Fix Bug in itex Extension Firefox was too lenient, in allowing you to append nodes from another document to the svg canvas. Use adoptNode(), to do things right. (Google Chrome is more strict about this.) --- public/svg-edit/editor/extensions/ext-itex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/svg-edit/editor/extensions/ext-itex.js b/public/svg-edit/editor/extensions/ext-itex.js index 57599e1e..c8d20afc 100644 --- a/public/svg-edit/editor/extensions/ext-itex.js +++ b/public/svg-edit/editor/extensions/ext-itex.js @@ -75,7 +75,7 @@ $(function() { $.post(ajaxEndpoint, {'tex': tex, 'display': 'inline'}, function(data){ var children = data.documentElement.childNodes; while (children.length > 0) { - mrow.appendChild(children[0]); + mrow.appendChild(svgdoc.adoptNode(children[0], true)); } S.sanitizeSvg(math); S.call("changed", [elt]);