From 2ea99bfdaf3076360fe6fccb3f8ad02d2fd42680 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 16 Mar 2011 11:37:52 -0600 Subject: [PATCH] Content server: Add workaround for Internet Explorer not supporting the ' entity. Fixes #9413 (Internet Explorer 8, Apostrophes in Book Titles in http://myhostname:8080/browse become ') --- src/calibre/library/server/browse.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/server/browse.py b/src/calibre/library/server/browse.py index 97bfc30f14..fd015f5848 100644 --- a/src/calibre/library/server/browse.py +++ b/src/calibre/library/server/browse.py @@ -12,7 +12,7 @@ import cherrypy from calibre.constants import filesystem_encoding from calibre import isbytestring, force_unicode, fit_image, \ - prepare_string_for_xml as xml + prepare_string_for_xml from calibre.utils.ordered_dict import OrderedDict from calibre.utils.filenames import ascii_filename from calibre.utils.config import prefs, tweaks @@ -23,6 +23,10 @@ from calibre.library.server import custom_fields_to_display from calibre.library.field_metadata import category_icon_map from calibre.library.server.utils import quote, unquote +def xml(*args, **kwargs): + ans = prepare_string_for_xml(*args, **kwargs) + return ans.replace(''', ''') + def render_book_list(ids, prefix, suffix=''): # {{{ pages = [] num = len(ids)