Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion readability/readability.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def title(self):
def short_title(self):
return shorten_title(self._html(True))

def get_clean_html(self):
return clean_attributes(tounicode(self.html))

def summary(self, html_partial=False):
"""Generate the summary of the html docuemnt

Expand Down Expand Up @@ -530,7 +533,8 @@ def sanitize(self, node, candidates):
#el.attrib = {} #FIXME:Checkout the effects of disabling this
pass

return clean_attributes(tounicode(node))
self.html = node
return self.get_clean_html()


class HashableElement():
Expand Down