diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2024-02-22 18:27:10 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2024-02-22 18:27:28 +0000 |
commit | 726aaea0fe87b40e983be73aa3c2fcd29aaf9588 (patch) | |
tree | cd8f455a8feee2ea9fbfa55be274896623be4291 /modules/ui_extra_networks.py | |
parent | 052fbde3ac41cce7b97d6bd7aa67fb8922866575 (diff) | |
download | stable-diffusion-webui-gfx803-726aaea0fe87b40e983be73aa3c2fcd29aaf9588.tar.gz stable-diffusion-webui-gfx803-726aaea0fe87b40e983be73aa3c2fcd29aaf9588.tar.bz2 stable-diffusion-webui-gfx803-726aaea0fe87b40e983be73aa3c2fcd29aaf9588.zip |
make extra network card description plaintext by default, with an option to re-enable HTML as it was
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r-- | modules/ui_extra_networks.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 6874a024..34c46ed4 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -289,12 +289,16 @@ class ExtraNetworksPage: }
)
+ description = (item.get("description", "") or "" if shared.opts.extra_networks_card_show_desc else "")
+ if not shared.opts.extra_networks_card_description_is_html:
+ description = html.escape(description)
+
# Some items here might not be used depending on HTML template used.
args = {
"background_image": background_image,
"card_clicked": onclick,
"copy_path_button": btn_copy_path,
- "description": (item.get("description", "") or "" if shared.opts.extra_networks_card_show_desc else ""),
+ "description": description,
"edit_button": btn_edit_item,
"local_preview": quote_js(item["local_preview"]),
"metadata_button": btn_metadata,
|