summaryrefslogtreecommitdiff
path: root/compressor/parser/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'compressor/parser/__init__.py')
-rw-r--r--compressor/parser/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/compressor/parser/__init__.py b/compressor/parser/__init__.py
index bc8c18c..a3fe78f 100644
--- a/compressor/parser/__init__.py
+++ b/compressor/parser/__init__.py
@@ -1,3 +1,4 @@
+from django.utils import six
from django.utils.functional import LazyObject
from django.utils.importlib import import_module
@@ -11,8 +12,9 @@ from compressor.parser.html5lib import Html5LibParser # noqa
class AutoSelectParser(LazyObject):
options = (
- ('lxml.html', LxmlParser), # lxml, extremely fast
- ('HTMLParser', HtmlParser), # fast and part of the Python stdlib
+ # TODO: make lxml.html parser first again
+ (six.moves.html_parser.__name__, HtmlParser), # fast and part of the Python stdlib
+ ('lxml.html', LxmlParser), # lxml, extremely fast
)
def __init__(self, content):