Skip to content

Commit e121fae

Browse files
committed
add encoding attribute to parsed tree
1 parent 4dcd6f9 commit e121fae

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

readability/readability.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def _html(self, force=False):
159159
def _parse(self, input):
160160
if isinstance(input, (_ElementTree, HtmlElement)):
161161
doc = input
162+
self.encoding = 'utf-8'
162163
else:
163164
doc, self.encoding = build_doc(input)
164165
doc = html_cleaner.clean_html(doc)

0 commit comments

Comments
 (0)