New submission from Guido Reina:
In the file: Lib/_markupbase.py, function: "_parse_doctype_element" there is:
if '>' in rawdata[j:]:
return rawdata.find(">", j) + 1
rawdata[j:] is being scanned twice.
It would be better to do:
pos = rawdata.find(">", j)
if pos != -1:
return pos + 1
Same thing in the function: "_parse_doctype_attlist":
if ")" in rawdata[j:]:
j = rawdata.find(")", j) + 1
else:
return -1
It would be better to do:
pos = rawdata.find(")", j)
if pos != -1:
j = pos + 1
else:
return -1
----------
messages: 181903
nosy: guido
priority: normal
severity: normal
status: open
title: Small enhancements to Lib/_markupbase.py
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python
3.4, Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17183>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com