From 699be25b64a8b67a99786387c8b0407f7e939590 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 20 Nov 2025 17:05:46 +0100 Subject: [PATCH] general/clipboard: use textContent... ... and avoid having html entity encoded characters in clipboard. --- general/clipboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/clipboard.js b/general/clipboard.js index 30c3134..cbcfa4a 100644 --- a/general/clipboard.js +++ b/general/clipboard.js @@ -1,7 +1,7 @@ /* copy code to clipboard */ function CopyToClipboard(element) { element.style.filter = 'invert(1)'; - navigator.clipboard.writeText(element.firstElementChild.innerHTML); + navigator.clipboard.writeText(element.firstElementChild.textContent); setTimeout(function() { element.style.filter = 'invert(0)'; }, 100);