Change deprecated Attr.nodeValue to Attr.value

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2819 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Brett Zamir 2014-04-09 05:38:20 +00:00
parent 856d1971c2
commit e07d4e61be
1 changed files with 4 additions and 4 deletions

View File

@ -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(':');