From 85e0a2cb10cb079514cfd428dd4ac01e8947e5d8 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 22 Feb 2010 21:50:38 -0600 Subject: [PATCH] More tweaks Make the AJAX endpoint configurable (this could still be done better). Use POST, rather than GET for the AJAX request, so that we don't have to worry about overly-long equations. --- public/svg-edit/editor/extensions/ext-itex.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/svg-edit/editor/extensions/ext-itex.js b/public/svg-edit/editor/extensions/ext-itex.js index e48bdc5f..83e74dad 100644 --- a/public/svg-edit/editor/extensions/ext-itex.js +++ b/public/svg-edit/editor/extensions/ext-itex.js @@ -20,6 +20,7 @@ $(function() { se_ns = "http://svg-edit.googlecode.com", htmlns = "http://www.w3.org/1999/xhtml", mathns = "http://www.w3.org/1998/Math/MathML", + ajaxEndpoint = "../../itex", editingitex = false, svgdoc = S.svgroot.parentNode.ownerDocument, started, @@ -65,7 +66,7 @@ $(function() { try { math = svgdoc.createElementNS(mathns, 'math'); // make an AJAX request to the server, to get the MathML - $.get('../../itex', {'tex': tex, 'display': 'inline'}, function(data){ + $.post(ajaxEndpoint, {'tex': tex, 'display': 'inline'}, function(data){ math.setAttributeNS(xmlnsns, 'xmlns', mathns); math.setAttribute('display', 'inline'); var semantics = document.createElementNS(mathns, 'semantics');