Fix XML escaping problem in attributes, add unit test

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1400 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2010-02-17 15:51:57 +00:00
parent 19d9998743
commit 469868d731
2 changed files with 33 additions and 9 deletions

View File

@@ -1530,7 +1530,7 @@ function BatchCommand(text) {
var i = attrs.length;
while (i--) {
attr = attrs.item(i);
var attrVal = attr.nodeValue;
var attrVal = toXml(attr.nodeValue);
// only serialize attributes we don't use internally
if (attrVal != "" &&
$.inArray(attr.localName, ['width','height','xmlns','x','y','viewBox','id','overflow']) == -1)
@@ -1545,7 +1545,7 @@ function BatchCommand(text) {
} else {
for (var i=attrs.length-1; i>=0; i--) {
attr = attrs.item(i);
var attrVal = attr.nodeValue;
var attrVal = toXml(attr.nodeValue);
if (attr.localName == '-moz-math-font-style') continue;
if (attrVal != "") {
if(attrVal.indexOf('pointer-events') == 0) continue;