diff --git a/linkcheck/checker/__init__.py b/linkcheck/checker/__init__.py index 056bc95d..60c2fe93 100644 --- a/linkcheck/checker/__init__.py +++ b/linkcheck/checker/__init__.py @@ -18,7 +18,7 @@ Main functions for link checking. """ import os -from html import escape as html_escape +import html import urllib.parse from .. import strformat, url as urlutil, log, LOG_CHECK @@ -163,9 +163,9 @@ def get_index_html (urls): """ lines = ["", "
"] for entry in urls: - name = html_escape(entry) + name = html.escape(entry) try: - url = html_escape(urllib.parse.quote(entry)) + url = html.escape(urllib.parse.quote(entry)) except KeyError: # Some unicode entries raise KeyError. url = name diff --git a/linkcheck/lc_cgi.py b/linkcheck/lc_cgi.py index 29b71c91..5b5a7f6c 100644 --- a/linkcheck/lc_cgi.py +++ b/linkcheck/lc_cgi.py @@ -17,7 +17,7 @@ Functions used by the WSGI script. """ -from html import escape as html_escape +import html import os import threading import locale @@ -261,4 +261,4 @@ contains only these characters:A-Za-z0-9./_~-