From c72b0f3256672424a193040509ed63c755c805a2 Mon Sep 17 00:00:00 2001 From: timmywil Date: Fri, 6 May 2011 13:49:20 -0400 Subject: Check empty string instead of specified as specified is inconsistent on the name attribute. Fixes #9148. --- src/attributes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/attributes.js b/src/attributes.js index c22e89b71..86f2d74a7 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -491,8 +491,8 @@ if ( !jQuery.support.getSetAttribute ) { return elem.getAttribute( name ); } ret = elem.getAttributeNode( name ); - // Return undefined if not specified instead of empty string - return ret && ret.specified ? + // Return undefined if nodeValue is empty string + return ret && ret.nodeValue !== "" ? ret.nodeValue : undefined; }, -- cgit v1.2.3