diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-26 23:42:54 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-26 23:42:54 -0500 |
commit | 6a8fa5523c6783fc407a9f49f7b446d8f4327e8e (patch) | |
tree | 3867bd5618536c3acd69e759e383a042dda1eda4 /beautifulsoup/element.py | |
parent | 8a6e1b5e15368c9dd66b6b407b7328c2bd0360ad (diff) |
Made EntitySubstitution a utility class, not the kind of class you subclass.
Diffstat (limited to 'beautifulsoup/element.py')
-rw-r--r-- | beautifulsoup/element.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/beautifulsoup/element.py b/beautifulsoup/element.py index 6af27a8..61ed4ab 100644 --- a/beautifulsoup/element.py +++ b/beautifulsoup/element.py @@ -11,7 +11,7 @@ from util import isList DEFAULT_OUTPUT_ENCODING = "utf-8" -class PageElement(EntitySubstitution): +class PageElement(object): """Contains the navigational information for some part of the page (either a tag or a piece of text)""" @@ -363,7 +363,7 @@ class NavigableString(unicode, PageElement): def output_ready(self, substitute_html_entities=False): if substitute_html_entities: - output = self.substitute_html(self) + output = EntitySubstitution.substitute_html(self) else: output = self return self.PREFIX + output + self.SUFFIX @@ -580,7 +580,8 @@ class Tag(PageElement): and '%SOUP-ENCODING%' in val): val = self.substituteEncoding(val, eventual_encoding) - decoded = key + '=' + self.substitute_xml(val, True) + decoded = (key + '=' + + EntitySubstitution.substitute_xml(val, True)) attrs.append(decoded) close = '' closeTag = '' |