Mercurial > cpython-lru_cache-weakref
comparison Lib/HTMLParser.py @ 61888:4be21a08dd70 2.6
Merged revisions 81500-81501 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81500 | victor.stinner | 2010-05-24 23:33:24 +0200 (lun., 24 mai 2010) | 2 lines
Issue #6662: Fix parsing of malformatted charref (&#bad;)
........
r81501 | victor.stinner | 2010-05-24 23:37:28 +0200 (lun., 24 mai 2010) | 2 lines
Add the author of the last fix (Issue #6662)
........
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Mon, 24 May 2010 21:42:59 +0000 |
| parents | 454d38c1f47e |
| children | 05cccd4257a2 |
comparison
equal
deleted
inserted
replaced
| 61881:2f24a2ef7331 | 61888:4be21a08dd70 |
|---|---|
| 173 if not startswith(';', k-1): | 173 if not startswith(';', k-1): |
| 174 k = k - 1 | 174 k = k - 1 |
| 175 i = self.updatepos(i, k) | 175 i = self.updatepos(i, k) |
| 176 continue | 176 continue |
| 177 else: | 177 else: |
| 178 if ";" in rawdata[i:]: #bail by consuming &# | |
| 179 self.handle_data(rawdata[0:2]) | |
| 180 i = self.updatepos(i, 2) | |
| 178 break | 181 break |
| 179 elif startswith('&', i): | 182 elif startswith('&', i): |
| 180 match = entityref.match(rawdata, i) | 183 match = entityref.match(rawdata, i) |
| 181 if match: | 184 if match: |
| 182 name = match.group(1) | 185 name = match.group(1) |
