mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
Merge pull request #858 from botchedchuckle/patch-1
Fix: Escape HTML in Prompt/NegativePrompt for MetadataPanel
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
* MetadataPanel.js
|
* MetadataPanel.js
|
||||||
* Generates metadata panels for showcase media items
|
* Generates metadata panels for showcase media items
|
||||||
*/
|
*/
|
||||||
|
import { escapeHtml } from '../utils.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate metadata panel HTML
|
* Generate metadata panel HTML
|
||||||
@@ -49,6 +50,7 @@ export function generateMetadataPanel(hasParams, hasPrompts, prompt, negativePro
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (prompt) {
|
if (prompt) {
|
||||||
|
prompt = escapeHtml(prompt);
|
||||||
content += `
|
content += `
|
||||||
<div class="metadata-row prompt-row">
|
<div class="metadata-row prompt-row">
|
||||||
<span class="metadata-label">Prompt:</span>
|
<span class="metadata-label">Prompt:</span>
|
||||||
@@ -64,6 +66,7 @@ export function generateMetadataPanel(hasParams, hasPrompts, prompt, negativePro
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (negativePrompt) {
|
if (negativePrompt) {
|
||||||
|
negativePrompt = escapeHtml(negativePrompt);
|
||||||
content += `
|
content += `
|
||||||
<div class="metadata-row prompt-row">
|
<div class="metadata-row prompt-row">
|
||||||
<span class="metadata-label">Negative Prompt:</span>
|
<span class="metadata-label">Negative Prompt:</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user