fix for a bug reported by krasn@deventum.com

This commit is contained in:
Miroslav Stampar 2011-06-20 13:25:19 +00:00
parent f09340fc89
commit d9015ed800
2 changed files with 5 additions and 2 deletions

View File

@ -224,8 +224,8 @@ Alexander Kornbrust <ak@red-database-security.com>
Krzysztof Kotowicz <kkotowicz@gmail.com> Krzysztof Kotowicz <kkotowicz@gmail.com>
for reporting a minor bug for reporting a minor bug
Nicolas Krassas <krasn@ans.gr> Nicolas Krassas <krasn@deventum.com>
for reporting a bug for reporting a couple of bugs
Oliver Kuckertz <oliver.kuckertz@mologie.de> Oliver Kuckertz <oliver.kuckertz@mologie.de>
for providing a minor patch for providing a minor patch

View File

@ -549,6 +549,9 @@ class Tag(PageElement):
val)) val))
self.attrs = map(convert, self.attrs) 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): def getString(self):
if (len(self.contents) == 1 if (len(self.contents) == 1
and isinstance(self.contents[0], NavigableString)): and isinstance(self.contents[0], NavigableString)):