fix: error rendering name and description in extra network ui

This commit is contained in:
Littleor 2023-07-26 11:02:34 +08:00
parent d0bf509fa1
commit b73c405013
1 changed files with 2 additions and 2 deletions

View File

@ -253,8 +253,8 @@ class ExtraNetworksPage:
"prompt": item.get("prompt", None), "prompt": item.get("prompt", None),
"tabname": quote_js(tabname), "tabname": quote_js(tabname),
"local_preview": quote_js(item["local_preview"]), "local_preview": quote_js(item["local_preview"]),
"name": item["name"], "name": html.escape(item["name"]),
"description": (item.get("description") or "" if shared.opts.extra_networks_card_show_desc else ""), "description": html.escape(item.get("description") or "" if shared.opts.extra_networks_card_show_desc else ""),
"card_clicked": onclick, "card_clicked": onclick,
"save_card_preview": '"' + html.escape(f"""return saveCardPreview(event, {quote_js(tabname)}, {quote_js(item["local_preview"])})""") + '"', "save_card_preview": '"' + html.escape(f"""return saveCardPreview(event, {quote_js(tabname)}, {quote_js(item["local_preview"])})""") + '"',
"search_term": item.get("search_term", ""), "search_term": item.get("search_term", ""),