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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user