summaryrefslogtreecommitdiffstats
path: root/Lib/html/parser.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-11-22 03:49:29 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-11-22 03:49:29 (GMT)
commitf6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab (patch)
tree1ac8e32faba127a5b7accab4fd72109a787f7867 /Lib/html/parser.py
parent32f0c7a67b6b2eb3808b47b462e837582d6710f8 (diff)
downloadcpython-f6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab.zip
cpython-f6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab.tar.gz
cpython-f6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab.tar.bz2
#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 e793c37..a228e8e 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)