Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2010-02-22 23:25:17 -06:00
commit 71ad1344c1

View file

@ -81,8 +81,8 @@ $(function() {
semantics.appendChild(mrow); semantics.appendChild(mrow);
semantics.appendChild(annotation); semantics.appendChild(annotation);
math.appendChild(semantics); math.appendChild(semantics);
S.sanitizeSvg(math);
}); });
S.sanitizeSvg(math);
elt.replaceChild(math, elt.firstChild); elt.replaceChild(math, elt.firstChild);
S.call("changed", [elt]); S.call("changed", [elt]);
svgCanvas.clearSelection(); svgCanvas.clearSelection();
@ -94,6 +94,10 @@ $(function() {
return true; return true;
}; };
function unescapeHTML(str) {
return str.replace(/&amp;/g, '&').replace(/&lt;/g, '<');
}
function showItexEditor() { function showItexEditor() {
var elt = selElems[0]; var elt = selElems[0];
var annotation = jQuery('math > semantics > annotation', elt); var annotation = jQuery('math > semantics > annotation', elt);
@ -102,7 +106,7 @@ $(function() {
toggleSourceButtons(true); toggleSourceButtons(true);
// elt.removeAttribute('fill'); // elt.removeAttribute('fill');
var str = annotation.text(); var str = unescapeHTML(annotation.text());
$('#svg_source_textarea').val(str); $('#svg_source_textarea').val(str);
$('#svg_source_editor').fadeIn(); $('#svg_source_editor').fadeIn();
properlySourceSizeTextArea(); properlySourceSizeTextArea();