From 45903db4c97d5931a98d82b13075ccb7657d395d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 14 Jan 2008 21:41:40 +0000 Subject: [PATCH] Handle lit files with the ampersand character in the names of constituent files. --- src/libprs500/ebooks/lrf/html/convert_from.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libprs500/ebooks/lrf/html/convert_from.py b/src/libprs500/ebooks/lrf/html/convert_from.py index 039149d6a5..5959b752bc 100644 --- a/src/libprs500/ebooks/lrf/html/convert_from.py +++ b/src/libprs500/ebooks/lrf/html/convert_from.py @@ -1347,6 +1347,8 @@ class HTMLConverter(object): elif tagname == 'img': if tag.has_key('src'): path = munge_paths(self.target_prefix, tag['src'])[0] + if not os.path.exists(path): + path = path.replace('&', '%26') # convertlit replaces & with %26 if os.access(path, os.R_OK) and os.path.isfile(path): width, height = None, None try: