mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1130478 (Chrome incompatibility)
This commit is contained in:
parent
f215bf5e50
commit
c85b98168a
@ -590,7 +590,7 @@ class BrowseServer(object):
|
|||||||
entries = get_category_items(category, entries,
|
entries = get_category_items(category, entries,
|
||||||
self.search_restriction_name, datatype,
|
self.search_restriction_name, datatype,
|
||||||
self.opts.url_prefix)
|
self.opts.url_prefix)
|
||||||
return json.dumps(entries, ensure_ascii=False)
|
return json.dumps(entries, ensure_ascii=True)
|
||||||
|
|
||||||
|
|
||||||
@Endpoint()
|
@Endpoint()
|
||||||
@ -814,7 +814,7 @@ class BrowseServer(object):
|
|||||||
summs.append(self.browse_summary_template.format(**args))
|
summs.append(self.browse_summary_template.format(**args))
|
||||||
|
|
||||||
|
|
||||||
raw = json.dumps('\n'.join(summs), ensure_ascii=False)
|
raw = json.dumps('\n'.join(summs), ensure_ascii=True)
|
||||||
return raw
|
return raw
|
||||||
|
|
||||||
def browse_render_details(self, id_):
|
def browse_render_details(self, id_):
|
||||||
@ -828,9 +828,8 @@ class BrowseServer(object):
|
|||||||
args['formats'] = ''
|
args['formats'] = ''
|
||||||
if fmts:
|
if fmts:
|
||||||
ofmts = [u'<a href="{4}/get/{0}/{1}_{2}.{0}" title="{3}">{3}</a>'\
|
ofmts = [u'<a href="{4}/get/{0}/{1}_{2}.{0}" title="{3}">{3}</a>'\
|
||||||
.format(fmt, fname, id_, fmt.upper(),
|
.format(xfmt, fname, id_, xfmt.upper(),
|
||||||
self.opts.url_prefix) for fmt in
|
self.opts.url_prefix) for xfmt in fmts]
|
||||||
fmts]
|
|
||||||
ofmts = ', '.join(ofmts)
|
ofmts = ', '.join(ofmts)
|
||||||
args['formats'] = ofmts
|
args['formats'] = ofmts
|
||||||
fields, comments = [], []
|
fields, comments = [], []
|
||||||
@ -893,7 +892,7 @@ class BrowseServer(object):
|
|||||||
|
|
||||||
ans = self.browse_render_details(id_)
|
ans = self.browse_render_details(id_)
|
||||||
|
|
||||||
return json.dumps(ans, ensure_ascii=False)
|
return json.dumps(ans, ensure_ascii=True)
|
||||||
|
|
||||||
@Endpoint()
|
@Endpoint()
|
||||||
def browse_random(self, *args, **kwargs):
|
def browse_random(self, *args, **kwargs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user