From ac6292d614633c55f9c6e4a64c2a106dae479b15 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Fri, 11 Jul 2014 16:40:36 +0100 Subject: [PATCH] Replaced lxml with html5lib --- setup.py | 2 +- wagtail/wagtailcore/whitelist.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()