URL quote item_value in CC web search templates

This commit is contained in:
Kovid Goyal 2025-02-08 12:56:54 +05:30
parent 65f89bda7a
commit a632436c60
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -69,7 +69,7 @@ def search_action_with_data(search_term, value, book_id, field=None, **k):
def web_search_link(template, mi, value):
formatter = SafeFormat()
mi.set('item_value', value)
mi.set('item_value', qquote(str(value)))
u = formatter.safe_format(template, mi, 'BOOK DETAILS WEB LINK', mi)
if u:
return u, prepare_string_for_xml(_('Click to browse to: {}').format(u), attribute=True)