summaryrefslogtreecommitdiff
path: root/beautifulsoup/builder/__init__.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-18 15:13:41 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-18 15:13:41 -0500
commit8249b803d9bab9c06be02a244e629cb732f4f5b1 (patch)
tree447cddabac142fefd583df1acd6268f6abcb8f5c /beautifulsoup/builder/__init__.py
parent0dda99b15112df7225e647db9702fbd62dcc8ea8 (diff)
parente170ff33e67e806cf33e2e51fcefcfa0b9310d96 (diff)
Ported the rest of the HTML tests, including tests of broken HTML from the TODO. Made Unicode, Dammit PEP-8 compliant.
Diffstat (limited to 'beautifulsoup/builder/__init__.py')
-rw-r--r--beautifulsoup/builder/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/beautifulsoup/builder/__init__.py b/beautifulsoup/builder/__init__.py
index 5bf5929..5c275d7 100644
--- a/beautifulsoup/builder/__init__.py
+++ b/beautifulsoup/builder/__init__.py
@@ -120,8 +120,8 @@ class HTMLTreeBuilder(TreeBuilder):
# This is an interesting meta tag.
match = self.CHARSET_RE.search(content)
if match:
- if (self.soup.declaredHTMLEncoding is not None or
- self.soup.originalEncoding == self.soup.fromEncoding):
+ if (self.soup.declared_html_encoding is not None or
+ self.soup.original_encoding == self.soup.fromEncoding):
# An HTML encoding was sniffed while converting
# the document to Unicode, or an HTML encoding was
# sniffed during a previous pass through the
@@ -136,9 +136,9 @@ class HTMLTreeBuilder(TreeBuilder):
# Go through it again with the encoding information.
new_charset = match.group(3)
if (new_charset is not None
- and new_charset != self.soup.originalEncoding):
- self.soup.declaredHTMLEncoding = new_charset
- self.soup._feed(self.soup.declaredHTMLEncoding)
+ and new_charset != self.soup.original_encoding):
+ self.soup.declared_html_encoding = new_charset
+ self.soup._feed(self.soup.declared_html_encoding)
raise StopParsing
pass
return False