mirror of
https://github.com/python/cpython.git
synced 2025-08-28 20:56:54 +00:00
parent
ecfeb7f095
commit
70a6b49821
246 changed files with 926 additions and 962 deletions
|
@ -272,8 +272,8 @@ class HTMLParser(markupbase.ParserBase):
|
|||
- self.__starttag_text.rfind("\n")
|
||||
else:
|
||||
offset = offset + len(self.__starttag_text)
|
||||
self.error("junk characters in start tag: %s"
|
||||
% `rawdata[k:endpos][:20]`)
|
||||
self.error("junk characters in start tag: %r"
|
||||
% (rawdata[k:endpos][:20],))
|
||||
if end.endswith('/>'):
|
||||
# XHTML-style empty tag: <span attr="value" />
|
||||
self.handle_startendtag(tag, attrs)
|
||||
|
@ -324,7 +324,7 @@ class HTMLParser(markupbase.ParserBase):
|
|||
j = match.end()
|
||||
match = endtagfind.match(rawdata, i) # </ + tag + >
|
||||
if not match:
|
||||
self.error("bad end tag: %s" % `rawdata[i:j]`)
|
||||
self.error("bad end tag: %r" % (rawdata[i:j],))
|
||||
tag = match.group(1)
|
||||
self.handle_endtag(tag.lower())
|
||||
self.clear_cdata_mode()
|
||||
|
@ -368,7 +368,7 @@ class HTMLParser(markupbase.ParserBase):
|
|||
pass
|
||||
|
||||
def unknown_decl(self, data):
|
||||
self.error("unknown declaration: " + `data`)
|
||||
self.error("unknown declaration: %r" % (data,))
|
||||
|
||||
# Internal -- helper to remove special character quoting
|
||||
def unescape(self, s):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue