mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 06:33:08 +02:00
Fix #1130478 (Chrome incompatibility)
This commit is contained in:
parent
f215bf5e50
commit
c85b98168a
1 changed files with 5 additions and 6 deletions
|
|
@ -590,7 +590,7 @@ def browse_category_group(self, category=None, group=None, sort=None):
|
|||
entries = get_category_items(category, entries,
|
||||
self.search_restriction_name, datatype,
|
||||
self.opts.url_prefix)
|
||||
return json.dumps(entries, ensure_ascii=False)
|
||||
return json.dumps(entries, ensure_ascii=True)
|
||||
|
||||
|
||||
@Endpoint()
|
||||
|
|
@ -814,7 +814,7 @@ def browse_booklist_page(self, ids=None, sort=None):
|
|||
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
|
||||
|
||||
def browse_render_details(self, id_):
|
||||
|
|
@ -828,9 +828,8 @@ def browse_render_details(self, id_):
|
|||
args['formats'] = ''
|
||||
if fmts:
|
||||
ofmts = [u'<a href="{4}/get/{0}/{1}_{2}.{0}" title="{3}">{3}</a>'\
|
||||
.format(fmt, fname, id_, fmt.upper(),
|
||||
self.opts.url_prefix) for fmt in
|
||||
fmts]
|
||||
.format(xfmt, fname, id_, xfmt.upper(),
|
||||
self.opts.url_prefix) for xfmt in fmts]
|
||||
ofmts = ', '.join(ofmts)
|
||||
args['formats'] = ofmts
|
||||
fields, comments = [], []
|
||||
|
|
@ -893,7 +892,7 @@ def browse_details(self, id=None):
|
|||
|
||||
ans = self.browse_render_details(id_)
|
||||
|
||||
return json.dumps(ans, ensure_ascii=False)
|
||||
return json.dumps(ans, ensure_ascii=True)
|
||||
|
||||
@Endpoint()
|
||||
def browse_random(self, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue