bpo-30629: Fix call lower() twice#2099
Conversation
https://bugs.python.org/issue30629 https://github.com/python/cpython/blob/master/Lib/html/parser.py#L415 ``` elem = match.group(1).lower() # script or style if self.cdata_elem is not None: if elem != self.cdata_elem: self.handle_data(rawdata[i:gtpos]) return gtpos self.handle_endtag(elem.lower()) ``` elem is lowercase string because lower() is called at the first line. So the last line of calling lower() is unnecessary.
|
@narusemotoki, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ezio-melotti, @freddrake and @bitdancer to be potential reviewers. |
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
|
@rhettinger @the-knights-who-say-ni |
https://bugs.python.org/issue30629
https://github.com/python/cpython/blob/master/Lib/html/parser.py#L415
elem is lowercase string because
lower()is called at the first line.So the last line of calling
lower()is unnecessary.