diff --git a/setup.py b/setup.py index 129a48468a..b37d4f256b 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ install_requires = [ "django-treebeard==2.0", "Pillow>=2.3.0", "beautifulsoup4>=4.3.2", - "lxml>=3.3.0", + "html5lib==0.999", "Unidecode>=0.04.14", "six==1.7.3", 'requests==2.3.0', diff --git a/wagtail/wagtailcore/whitelist.py b/wagtail/wagtailcore/whitelist.py index 4aaff780d8..dba8982fdc 100644 --- a/wagtail/wagtailcore/whitelist.py +++ b/wagtail/wagtailcore/whitelist.py @@ -81,7 +81,7 @@ class Whitelister(object): def clean(cls, html): """Clean up an HTML string to contain just the allowed elements / attributes""" - doc = BeautifulSoup(html, 'lxml') + doc = BeautifulSoup(html, 'html5lib') cls.clean_node(doc, doc) return doc.decode()