__copyright__ = "Copyright (C) 2006-2024 PhiloSoft Design"
from calendar import _localized_month
-import cgi
+from html import escape
import locale
import sys, os
from urllib.parse import quote, urljoin
def start_a(self, attrs):
self.accumulator += '<a'
for attrname, value in attrs:
- value = cgi.escape(value, True)
+ value = escape(value, True)
if attrname == 'href':
self.accumulator += ' href="%s"' % urljoin(self.base, value)
else:
def start_img(self, attrs):
self.accumulator += '<img'
for attrname, value in attrs:
- value = cgi.escape(value, True)
+ value = escape(value, True)
if attrname == 'src':
self.accumulator += ' src="%s"' % urljoin(self.base, value)
else: