summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2013-06-03 08:58:59 -0400
committerLeonard Richardson <leonard.richardson@canonical.com>2013-06-03 08:58:59 -0400
commitc8545a7b00a77d2f606620ef69b36b35291d8174 (patch)
tree2d4ee494b03ca80718fc77bc7b0556dde72b080d /bs4/element.py
parentb25f977fdae354fa15de789116e54e95d84d3d28 (diff)
Improved performance of _replace_cdata_list_attribute_values, and greatly reduced the number of times it is called.
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py
index f6864f2..7b63b30 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -746,7 +746,7 @@ class Tag(PageElement):
self.prefix = prefix
if attrs is None:
attrs = {}
- elif builder.cdata_list_attributes:
+ elif attrs and builder.cdata_list_attributes:
attrs = builder._replace_cdata_list_attribute_values(
self.name, attrs)
else: