diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-26 21:26:15 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-26 21:26:15 -0500 |
commit | d7056f49c8bb3a448cec2f1a6f2de55e93c8e8d6 (patch) | |
tree | cc75bdadec0060288b1b76213c3ac2de34d9ab68 /beautifulsoup/__init__.py | |
parent | ef5770589595e80cbd9690b64504a2166b3558fd (diff) |
First stab at HTML entity replacement.
Diffstat (limited to 'beautifulsoup/__init__.py')
-rw-r--r-- | beautifulsoup/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/beautifulsoup/__init__.py b/beautifulsoup/__init__.py index cee55e7..f4c2a95 100644 --- a/beautifulsoup/__init__.py +++ b/beautifulsoup/__init__.py @@ -263,7 +263,8 @@ class BeautifulSoup(Tag): self.currentData.append(data) def decode(self, pretty_print=False, indent_level=0, - eventual_encoding=DEFAULT_OUTPUT_ENCODING): + eventual_encoding=DEFAULT_OUTPUT_ENCODING, + replace_with_html_entities=False): """Returns a string or Unicode representation of this document. To get Unicode, pass None for encoding.""" if self.is_xml: @@ -275,7 +276,8 @@ class BeautifulSoup(Tag): else: prefix = u'' return prefix + super(BeautifulSoup, self).decode( - pretty_print, indent_level, eventual_encoding) + pretty_print, indent_level, eventual_encoding, + replace_with_html_entities) class StopParsing(Exception): |