|
|
@ -1995,6 +1995,14 @@ class SoupStrainer(object): |
|
|
|
if isinstance(markup_name, Tag): |
|
|
|
markup = markup_name |
|
|
|
markup_attrs = markup |
|
|
|
|
|
|
|
if isinstance(self.name, basestring): |
|
|
|
# Optimization for a very common case where the user is |
|
|
|
# searching for a tag with one specific name, and we're |
|
|
|
# looking at a tag with a different name. |
|
|
|
if markup and not markup.prefix and self.name != markup.name: |
|
|
|
return False |
|
|
|
|
|
|
|
call_function_with_tag_data = ( |
|
|
|
isinstance(self.name, Callable) |
|
|
|
and not isinstance(markup_name, Tag)) |
|
|
|