From: Motoki Naruse <motoki@naru.se>
Date: Sat, 17 Jun 2017 01:15:25 +0000 (+0900)
Subject: bpo-30629: Remove second call of str.lower() in html.parser.parse_endtag. (#2099)
X-Git-Tag: v3.7.0a1~569
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3358d589fb51372a56ddcfffa277855e5661c4c0;p=python

bpo-30629: Remove second call of str.lower() in html.parser.parse_endtag. (#2099)

elem is the result of .lower() 6 lines above the handle_endtag call.
Patch by Motoki Naruse
---

diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index ef869bc72d..de81879a63 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -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