From e07d4e61be53d0d5055c8c31d3ba03e452368f4b Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 9 Apr 2014 05:38:20 +0000 Subject: [PATCH] Change deprecated Attr.nodeValue to Attr.value git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2819 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/sanitize.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/sanitize.js b/editor/sanitize.js index 3fe901e0..f289f50a 100644 --- a/editor/sanitize.js +++ b/editor/sanitize.js @@ -156,13 +156,13 @@ svgedit.sanitize.sanitizeSvg = function(node) { // Check that an attribute with the correct localName in the correct namespace is on // our whitelist or is a namespace declaration for one of our allowed namespaces if (!(allowedAttrsNS.hasOwnProperty(attrLocalName) && attrNsURI == allowedAttrsNS[attrLocalName] && attrNsURI != NS.XMLNS) && - !(attrNsURI == NS.XMLNS && REVERSE_NS[attr.nodeValue]) ) + !(attrNsURI == NS.XMLNS && REVERSE_NS[attr.value]) ) { // TODO(codedread): Programmatically add the se: attributes to the NS-aware whitelist. // Bypassing the whitelist to allow se: prefixes. // Is there a more appropriate way to do this? if (attrName.indexOf('se:') === 0) { - seAttrs.push([attrName, attr.nodeValue]); + seAttrs.push([attrName, attr.value]); } node.removeAttributeNS(attrNsURI, attrLocalName); } @@ -173,7 +173,7 @@ svgedit.sanitize.sanitizeSvg = function(node) { case 'transform': case 'gradientTransform': case 'patternTransform': - var val = attr.nodeValue.replace(/(\d)-/g, '$1 -'); + var val = attr.value.replace(/(\d)-/g, '$1 -'); node.setAttribute(attrName, val); break; } @@ -181,7 +181,7 @@ svgedit.sanitize.sanitizeSvg = function(node) { // For the style attribute, rewrite it in terms of XML presentational attributes if (attrName == 'style') { - var props = attr.nodeValue.split(';'), + var props = attr.value.split(';'), p = props.length; while (p--) { var nv = props[p].split(':');