]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
webui: fix code copy stripping XML/HTML tags (#18518)
authorAnri Lombard <redacted>
Thu, 1 Jan 2026 12:44:11 +0000 (14:44 +0200)
committerGitHub <redacted>
Thu, 1 Jan 2026 12:44:11 +0000 (13:44 +0100)
* webui: fix code copy stripping XML/HTML tags

* webui: update static build

tools/server/public/index.html.gz
tools/server/webui/src/lib/utils/clipboard.ts

index d1c10eed91297c061f4d5dbd18dec4e620ae5bf1..b3983b2b1713529ed961bb56cdf0379811c3b9a8 100644 (file)
Binary files a/tools/server/public/index.html.gz and b/tools/server/public/index.html.gz differ
index 91e8ea75aef081774bef8e2044777b80307e2561..940e64c8ff0b62be017c746442493c94154badd0 100644 (file)
@@ -65,10 +65,7 @@ export async function copyCodeToClipboard(
        successMessage = 'Code copied to clipboard',
        errorMessage = 'Failed to copy code'
 ): Promise<boolean> {
-       const doc = new DOMParser().parseFromString(rawCode, 'text/html');
-       const decodedCode = doc.body.textContent ?? rawCode;
-
-       return copyToClipboard(decodedCode, successMessage, errorMessage);
+       return copyToClipboard(rawCode, successMessage, errorMessage);
 }
 
 /**