From d9015ed800e84ebc00f5e0e09bdc3e9c4be7dc93 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 20 Jun 2011 13:25:19 +0000 Subject: [PATCH] fix for a bug reported by krasn@deventum.com --- doc/THANKS | 4 ++-- extra/beautifulsoup/beautifulsoup.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/THANKS b/doc/THANKS index d75cdfab8..04d3e66b7 100644 --- a/doc/THANKS +++ b/doc/THANKS @@ -224,8 +224,8 @@ Alexander Kornbrust Krzysztof Kotowicz for reporting a minor bug -Nicolas Krassas - for reporting a bug +Nicolas Krassas + for reporting a couple of bugs Oliver Kuckertz for providing a minor patch diff --git a/extra/beautifulsoup/beautifulsoup.py b/extra/beautifulsoup/beautifulsoup.py index 4b17b853d..d43d3a71d 100644 --- a/extra/beautifulsoup/beautifulsoup.py +++ b/extra/beautifulsoup/beautifulsoup.py @@ -549,6 +549,9 @@ class Tag(PageElement): val)) self.attrs = map(convert, self.attrs) + # Reference: http://bytes.com/topic/python/answers/552874-py-2-5-bug-sgmllib + SGMLParser.convert_codepoint = lambda self, codepoint: unichr(codepoint) + def getString(self): if (len(self.contents) == 1 and isinstance(self.contents[0], NavigableString)):