This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author berker.peksag
Date 2018-08-23.18:12:19
SpamBayes Score -1.0
Marked as misclassified Yes
Thanks for the report.

HTMLParser.error() was supposed to raise an exception, but the BeautifulSoup project just prints a warning here:

    def error(self, msg):

As a result of this, the code doesn't stop executing in the following branch:

        self.error('unknown status keyword %r in marked section' % rawdata[i+3:j])
    if not match:
        return -1

Note that HTMLParser.error() was removed in Python 3.5 ( and there is an open issue about the status of _markupbase.ParserBase.error(): Issue 31844.

I also think that may have caused a minor regression when it was removed the error() method and its uses from the HTMLParser class. It still calls the parse_marked_section() method of _markupbase.ParserBase() which it then calls the error() method of _markupbase.ParserBase():

    elif rawdata[i:i+3] == '<![':
        return self.parse_marked_section(i)
Date User Action Args
2018-08-23 18:12:19berker.peksaglinkissue34480 messages
2018-08-23 18:12:19berker.peksagcreate