From d201f797662b9cd07cf7c4c9a28f76250fe33f9e Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Tue, 23 Feb 2010 10:16:14 -0600 Subject: [PATCH] No Need to Double-Escape Apparently, JQuery takes care of all of the escaping we need. So ditch our own escaping (which effectively double-escaped everything). --- public/svg-edit/editor/extensions/ext-itex.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/public/svg-edit/editor/extensions/ext-itex.js b/public/svg-edit/editor/extensions/ext-itex.js index 493b9772..b8ad543a 100644 --- a/public/svg-edit/editor/extensions/ext-itex.js +++ b/public/svg-edit/editor/extensions/ext-itex.js @@ -47,10 +47,6 @@ $(function() { $('#itex_save, #itex_cancel').toggle(on); } - function htmlEscape(string) { - return string.replace(/&/g, '&').replace(/ 0) { @@ -94,10 +90,6 @@ $(function() { return true; }; - function unescapeHTML(str) { - return str.replace(/&/g, '&').replace(/</g, '<'); - } - function showItexEditor() { var elt = selElems[0]; var annotation = jQuery('math > semantics > annotation', elt); @@ -106,7 +98,7 @@ $(function() { toggleSourceButtons(true); // elt.removeAttribute('fill'); - var str = unescapeHTML(annotation.text()); + var str = annotation.text(); $('#svg_source_textarea').val(str); $('#svg_source_editor').fadeIn(); properlySourceSizeTextArea();