From 8775a98191aad82390a40c570216f14efc220524 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 30 Apr 2007 19:48:59 +0000 Subject: [PATCH] Handle quoted URLs in elements. Fix #34. --- src/libprs500/__init__.py | 2 +- src/libprs500/lrf/html/convert_from.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libprs500/__init__.py b/src/libprs500/__init__.py index d448824b69..5b8a0d20bc 100644 --- a/src/libprs500/__init__.py +++ b/src/libprs500/__init__.py @@ -33,7 +33,7 @@ You may have to adjust the GROUP and the location of the rules file to suit your distribution. """ -__version__ = "0.3.15" +__version__ = "0.3.16" __docformat__ = "epytext" __author__ = "Kovid Goyal " diff --git a/src/libprs500/lrf/html/convert_from.py b/src/libprs500/lrf/html/convert_from.py index 2cc4c9012a..8a44438017 100644 --- a/src/libprs500/lrf/html/convert_from.py +++ b/src/libprs500/lrf/html/convert_from.py @@ -22,7 +22,7 @@ and to Falstaff for pylrs. """ import os, re, sys, shutil, traceback from htmlentitydefs import name2codepoint -from urllib import urlopen +from urllib import urlopen, unquote from urlparse import urlparse from tempfile import mkdtemp from operator import itemgetter @@ -397,7 +397,7 @@ class HTMLConverter(object): purl = urlparse(link.tag['href']) if purl[1]: # Not a link to a file on the local filesystem continue - path, fragment = purl[2], purl[5] + path, fragment = unquote(purl[2]), purl[5] para, tag = link.para, link.tag if not path or os.path.basename(path) == self.file_name: if fragment in self.targets.keys():