kopia lustrzana https://github.com/wagtail/wagtail
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
rodzic
fdff690323
commit
da8f1e4273
|
|
@ -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):
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue