diff options
author | Leonard Richardson <leonardr@segfault.org> | 2021-02-13 09:47:34 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2021-02-13 09:47:34 -0500 |
commit | 316093c577193e5e604bb90a16d520e2f5c1b60b (patch) | |
tree | 67651fdf2f88c958c1751c56078b7d32f973a1c2 /bs4/element.py | |
parent | c9b6a61f355bcd9161a010156860346cbfdcdc53 (diff) |
Corrected output when the namespace prefix associated with a
namespaced attribute is the empty string, as opposed to
None. [bug=1915583]
Diffstat (limited to 'bs4/element.py')
-rw-r--r-- | bs4/element.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bs4/element.py b/bs4/element.py index 09a81d9..4d9c150 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -83,9 +83,9 @@ class NamespacedAttribute(unicode): # per https://www.w3.org/TR/xml-names/#defaulting name = None - if name is None: + if not name: obj = unicode.__new__(cls, prefix) - elif prefix is None: + elif not prefix: # Not really namespaced. obj = unicode.__new__(cls, name) else: |