Move py3 sgmllib to an internal module - Scott Kitterman

This commit is contained in:
Stuart D. Gathman
2018-12-23 20:29:01 -05:00
parent f9b2241ec6
commit 55e5378659
3 changed files with 4 additions and 4 deletions
+4 -1
View File
@@ -401,7 +401,10 @@ class _defang:
# emulate old defang function
defang = _defang()
from sgmllib import SGMLParser as HTMLParser
if sys.version < '3.0.0':
from sgmllib import SGMLParser as HTMLParser
else:
from Milter.sgmllib import SGMLParser as HTMLParser
import re
declname = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*')