Explicitly specify html5lib for HTML comparison

This prevents a warning from BeautifulSoup, and should have no
functional difference because html5lib is a Wagtail dependency and
should therefore always be available.
pull/3275/merge
Matt Westcott 2017-02-03 15:48:03 +00:00
rodzic fdff690323
commit da8f1e4273
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -53,7 +53,10 @@ class TextFieldComparison(FieldComparison):
class RichTextFieldComparison(TextFieldComparison):
def htmldiff(self):
return diff_text(BeautifulSoup(force_text(self.val_a)).getText(), BeautifulSoup(force_text(self.val_b)).getText()).to_html()
return diff_text(
BeautifulSoup(force_text(self.val_a), 'html5lib').getText(),
BeautifulSoup(force_text(self.val_b), 'html5lib').getText()
).to_html()
class StreamFieldComparison(RichTextFieldComparison):