From 5e8399a4f1616a5c51e9669e3934a9944dffd6a3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Feb 2008 05:35:03 +0000 Subject: [PATCH] --- src/libprs500/ebooks/BeautifulSoup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libprs500/ebooks/BeautifulSoup.py b/src/libprs500/ebooks/BeautifulSoup.py index b249d695dc..5f23ae5935 100644 --- a/src/libprs500/ebooks/BeautifulSoup.py +++ b/src/libprs500/ebooks/BeautifulSoup.py @@ -88,10 +88,7 @@ import codecs import types import re import libprs500.ebooks.sgmllib as sgmllib -try: - from htmlentitydefs import name2codepoint -except ImportError: - name2codepoint = {} +from htmlentitydefs import name2codepoint #This hack makes Beautiful Soup able to parse XML with namespaces sgmllib.tagfind = re.compile('[a-zA-Z][-_.:a-zA-Z0-9]*')