summaryrefslogtreecommitdiff
path: root/Lib/html/parser.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-11-22 05:49:29 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2013-11-22 05:49:29 +0200
commitf620cad215ab9ce8416802bd5f128ead76ead907 (patch)
tree2a1238455ac32b0cf4fa5bb8a4712250dbb3b88b /Lib/html/parser.py
parent5bc83f8b89d723754b91bafafe8d660a1d8a8ff3 (diff)
downloadcpython-f620cad215ab9ce8416802bd5f128ead76ead907.tar.gz
#19688: add back and deprecate the internal HTMLParser.unescape() method.
Diffstat (limited to 'Lib/html/parser.py')
-rw-r--r--Lib/html/parser.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index e793c37cd8..a228e8ed37 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -513,3 +513,10 @@ class HTMLParser(_markupbase.ParserBase):
def unknown_decl(self, data):
if self.strict:
self.error("unknown declaration: %r" % (data,))
+
+ # Internal -- helper to remove special character quoting
+ def unescape(self, s):
+ warnings.warn('The unescape method is deprecated and will be removed '
+ 'in 3.5, use html.unescape() instead.',
+ DeprecationWarning, stacklevel=2)
+ return unescape(s)