diff --git a/wrp.py b/wrp.py index 2d7486c..af356a9 100755 --- a/wrp.py +++ b/wrp.py @@ -262,11 +262,11 @@ if sys.platform == "linux" or sys.platform == "linux2": turl = QUrl(web_url).resolved(QUrl(x.attribute('href'))).toString() xmin, ymin, xmax, ymax = x.geometry().getCoords() if ISMAP == "true": - mapfile.write("rect %s %i,%i %i,%i\n" % (turl, xmin, ymin, xmax, ymax)) + mapfile.write("rect %s %i,%i %i,%i\n".decode('utf-8', errors='ignore') % (turl, xmin, ymin, xmax, ymax)) else: httpout.write("\n" + " ALT=\"%s\" HREF=\"%s\">\n".decode('utf-8', errors='ignore') % (xmin, ymin, xmax, ymax, turl, turl)) if ISMAP != "true": @@ -547,6 +547,7 @@ elif sys.platform == "darwin": % ttl.toPlainText()).encode('utf-8', errors='ignore')) break # Don't repeat bad HTML coding with several title marks httpout.write("\n
\n") + if ISMAP == "true": httpout.write("" "