File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 4444except :
4545 from html import escape as ESCAPE
4646
47+ try :
48+ from cgi import escape as ESCAPE
49+ except :
50+ from html import escape as ESCAPE
4751
4852# this is a hack that needs to be streamlined a bit
4953try :
6266
6367 HTMLParser = parser .HTMLParser
6468
65-
6669from . import CBModel
6770from .CBCommon import (
6871 getGPRasDictFromString ,
@@ -261,8 +264,13 @@ def get_data(self):
261264 self .fed = []
262265 return data
263266
264-
267+ # with Python 3.9+ moving unescape we now need to implement a nasty hack
265268__tagStripper__ = MLStripper ()
269+ try :
270+ __tagStripper__ .unescape ('dfsdfsdfsdfsdfsdfsdef' )
271+ except AttributeError as err :
272+ from html import unescape
273+ __tagStripper__ .unescape = unescape
266274
267275
268276def xml_stripTags (html ):
You can’t perform that action at this time.
0 commit comments