diff options
Diffstat (limited to 'bs4/element.py')
-rw-r--r-- | bs4/element.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py index ff7c972..c053181 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -1030,7 +1030,10 @@ class SoupStrainer(object): and not isinstance(match_against, basestring)): result = markup in match_against elif hasattr(match_against, 'items'): - result = match_against in markup + if markup is None: + result = len(match_against.items()) == 0 + else: + result = match_against in markup elif match_against and isinstance(markup, basestring): match_against = markup.__class__(match_against) |