Commit 08e5d977 authored by Nicolas Delaby's avatar Nicolas Delaby

Fix AttributeError

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42026 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c89e5f25
...@@ -181,7 +181,7 @@ class StrippingParser(HTMLParser): ...@@ -181,7 +181,7 @@ class StrippingParser(HTMLParser):
# (begin) copied from Python-2.6's HTMLParser.py # (begin) copied from Python-2.6's HTMLParser.py
# Cannot use name2codepoint directly, because HTMLParser supports apos, # Cannot use name2codepoint directly, because HTMLParser supports apos,
# which is not part of HTML 4 # which is not part of HTML 4
if self.entitydefs is None: if getattr(self, 'entitydefs', None) is None:
import htmlentitydefs import htmlentitydefs
entitydefs = HTMLParser.entitydefs = {'apos':u"'"} entitydefs = HTMLParser.entitydefs = {'apos':u"'"}
for k, v in htmlentitydefs.name2codepoint.iteritems(): for k, v in htmlentitydefs.name2codepoint.iteritems():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment