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 ')

This commit is contained in:
Kovid Goyal 2011-03-16 11:37:52 -06:00
parent 37466dcf6b
commit 2ea99bfdaf

View File

@ -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)