From 23329a21c2a00c312f024579cb47040f737cb6fe Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Mon, 2 Jul 2012 16:10:06 -0400 Subject: Fixed a typo that made parsing much slower than it should have been. [bug=1020268] --- NEWS.txt | 8 +++++++- bs4/__init__.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 2ca93ce..56e55c5 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,9 +1,15 @@ = 4.1.1 (Unreleased) = -Fixed an html5lib tree builder crash which happened when html5lib +* Fixed an html5lib tree builder crash which happened when html5lib moved a tag with a multivalued attribute from one part of the tree to another. [bug=1019603] +* Correctly handle closing tags with an XML namespace declared. Patch + by Andreas Kostyrka. [bug=1019635] + +* Fixed a typo that made parsing significantly slower than it should + have been. [bug=1020268] + = 4.1.0 (20120529) = * Added experimental support for fixing Windows-1252 characters diff --git a/bs4/__init__.py b/bs4/__init__.py index af8c718..0e59a33 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -267,7 +267,7 @@ class BeautifulSoup(Tag): for i in range(len(self.tagStack) - 1, 0, -1): if (name == self.tagStack[i].name - and nsprefix == self.tagStack[i].nsprefix == nsprefix): + and nsprefix == self.tagStack[i].prefix): numPops = len(self.tagStack) - i break if not inclusivePop: -- cgit v1.2.3