summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-04-18 14:44:36 -0400
committerLeonard Richardson <leonard.richardson@canonical.com>2012-04-18 14:44:36 -0400
commit2261264fb5b4cc8a9095a1b14a92b52258e8029e (patch)
tree263695b2abe0043bcd3a699b45001ed2ae7f64b8 /bs4/element.py
parent7b9d05ec019d59575a0280c6e109e794e142f8cf (diff)
Got rid of contains_substitutions.
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/bs4/element.py b/bs4/element.py
index 3729789..aa9a3e9 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -636,11 +636,6 @@ class PageElement(object):
def parentGenerator(self):
return self.parents
- # Utility methods
- def substitute_encoding(self, str, encoding=None):
- encoding = encoding or "utf-8"
- return str.replace("%SOUP-ENCODING%", encoding)
-
class NavigableString(unicode, PageElement):
@@ -761,11 +756,9 @@ class Tag(PageElement):
# Set up any substitutions, such as the charset in a META tag.
if builder is not None:
- self.contains_substitutions = builder.set_up_substitutions(self)
-
+ builder.set_up_substitutions(self)
self.can_be_empty_element = builder.can_be_empty_element(name)
else:
- self.contains_substitutions = False
self.can_be_empty_element = False
parserClass = _alias("parser_class") # BS3