Add ported sgmllib module to keep SGMLFilter working for now.

This commit is contained in:
Stuart D. Gathman
2016-09-29 00:19:26 -04:00
parent 9d7645c1a5
commit 626d5ae20e
3 changed files with 582 additions and 31 deletions
+1 -4
View File
@@ -401,10 +401,7 @@ class _defang:
# emulate old defang function
defang = _defang()
try:
from html.parser import HTMLParser
except:
from sgmllib import SGMLParser as HTMLParser
from sgmllib import SGMLParser as HTMLParser
import re
declname = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*')