More bogus attribute/namespace fixes.

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1553 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jacques Distler 2010-04-28 21:43:33 +00:00
parent 09c409e40a
commit f78cd75984
1 changed files with 3 additions and 5 deletions

View File

@ -1617,7 +1617,7 @@ function BatchCommand(text) {
var el = this;
$.each(this.attributes, function(i, attr) {
var uri = attr.namespaceURI;
if(uri && !nsuris[uri] && nsMap[uri] !== 'xmlns') {
if(uri && !nsuris[uri] && nsMap[uri] !== 'xmlns' && nsMap[uri] !== 'xml' ) {
nsuris[uri] = true;
out.push(" xmlns:" + nsMap[uri] + '="' + uri +'"');
}
@ -1632,9 +1632,6 @@ function BatchCommand(text) {
// Namespaces have already been dealt with, so skip
if(attr.nodeName.indexOf('xmlns:') === 0) continue;
//remove bogus attributes added by Gecko
if (attr.localName == '-moz-math-font-style') continue;
// only serialize attributes we don't use internally
if (attrVal != "" &&
$.inArray(attr.localName, ['width','height','xmlns','x','y','viewBox','id','overflow']) == -1)
@ -1651,7 +1648,8 @@ function BatchCommand(text) {
for (var i=attrs.length-1; i>=0; i--) {
attr = attrs.item(i);
var attrVal = toXml(attr.nodeValue);
if (attr.localName == '-moz-math-font-style') continue;
//remove bogus attributes added by Gecko
if ($.inArray(attr.localName, ['-moz-math-font-style', '_moz-math-font-style']) !== -1) continue;
if (attrVal != "") {
if(attrVal.indexOf('pointer-events') == 0) continue;
if(attr.localName == "class" && attrVal.indexOf('se_') == 0) continue;