#19688: add back and deprecate the internal HTMLParser.unescape() method.

This commit is contained in:
Ezio Melotti 2013-11-22 05:49:29 +02:00
parent 32f0c7a67b
commit f6de9eb2bb
2 changed files with 14 additions and 0 deletions

View file

@ -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)