Fix Issue 486: Remove uses without href to prevent Safari crash. Turns all unit tests green
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1408 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -1385,6 +1385,11 @@ function BatchCommand(text) {
|
||||
}
|
||||
}
|
||||
|
||||
// Safari crashes on a <use> without a xlink:href, so we just remove the node here
|
||||
if (node.nodeName == "use" && !node.getAttributeNS(xlinkns,"href")) {
|
||||
parent.removeChild(node);
|
||||
return;
|
||||
}
|
||||
// if the element has attributes pointing to a non-local reference,
|
||||
// need to remove the attribute
|
||||
$.each(["clip-path", "fill", "marker-end", "marker-mid", "marker-start", "mask", "stroke"],function(i,attr) {
|
||||
|
||||
Reference in New Issue
Block a user