import re
-import warnings
import _markupbase
from html import unescape
def unknown_decl(self, data):
pass
-
- # 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)
for html, expected in data:
self._run_check(html, expected)
- def test_unescape_method(self):
- from html import unescape
- p = self.get_collector()
- with self.assertWarns(DeprecationWarning):
- s = '""""""&#bad;'
- self.assertEqual(p.unescape(s), unescape(s))
-
def test_broken_comments(self):
html = ('<! not really a comment >'
'<! not a comment either -->'