mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1982651 [Details pane: Clicking on enumerated item with ampersand produces incorrect search](https://bugs.launchpad.net/calibre/+bug/1982651)
This commit is contained in:
parent
9aae5f8b29
commit
c8059f3cd1
@ -257,7 +257,7 @@ def mi_to_html(
|
|||||||
val = mi.format_field(field)[-1]
|
val = mi.format_field(field)[-1]
|
||||||
ans.append((field, row % (name, val)))
|
ans.append((field, row % (name, val)))
|
||||||
else:
|
else:
|
||||||
val = mi.format_field(field)[-1]
|
val = unescaped_val = mi.format_field(field)[-1]
|
||||||
if val is None:
|
if val is None:
|
||||||
continue
|
continue
|
||||||
val = p(val)
|
val = p(val)
|
||||||
@ -311,8 +311,8 @@ def mi_to_html(
|
|||||||
except Exception:
|
except Exception:
|
||||||
st = field
|
st = field
|
||||||
val = '<a href="{}" title="{}">{}</a>'.format(
|
val = '<a href="{}" title="{}">{}</a>'.format(
|
||||||
search_action_with_data(st, val, book_id, field), a(
|
search_action_with_data(st, unescaped_val, book_id, field), a(
|
||||||
_('Click to see books with {0}: {1}').format(metadata['name'] or field, val)), p(val))
|
_('Click to see books with {0}: {1}').format(metadata['name'] or field, val)), val)
|
||||||
elif metadata['datatype'] == 'bool':
|
elif metadata['datatype'] == 'bool':
|
||||||
val = '<a href="{}" title="{}">{}</a>'.format(
|
val = '<a href="{}" title="{}">{}</a>'.format(
|
||||||
search_action_with_data(field, val, book_id, None), a(
|
search_action_with_data(field, val, book_id, None), a(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user