]> granicus.if.org Git - python/commitdiff
bpo-30629: Remove second call of str.lower() in html.parser.parse_endtag. (#2099)
authorMotoki Naruse <motoki@naru.se>
Sat, 17 Jun 2017 01:15:25 +0000 (10:15 +0900)
committerterryjreedy <tjreedy@udel.edu>
Sat, 17 Jun 2017 01:15:25 +0000 (21:15 -0400)
elem is the result of .lower() 6 lines above the handle_endtag call.
Patch by Motoki Naruse

Lib/html/parser.py

index ef869bc72db780056ada375a5316aec83b1c6ad8..de81879a631ac7ea2c4e12c8ac3ffeb376c63418 100644 (file)
@@ -418,7 +418,7 @@ class HTMLParser(_markupbase.ParserBase):
                 self.handle_data(rawdata[i:gtpos])
                 return gtpos
 
-        self.handle_endtag(elem.lower())
+        self.handle_endtag(elem)
         self.clear_cdata_mode()
         return gtpos