diff --git a/pelican/utils.py b/pelican/utils.py index cc9eb405..92e819f9 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -424,7 +424,11 @@ class _HTMLWordTruncator(HTMLParser): def __init__(self, max_words): # In Python 2, HTMLParser is not a new-style class, # hence super() cannot be used. - HTMLParser.__init__(self) + try: + HTMLParser.__init__(self, convert_charrefs=False) + except TypeError: + # pre Python 3.3 + HTMLParser.__init__(self) self.max_words = max_words self.words_found = 0