From 04c955ac77ced0b81e41a10515e0423730516feb Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Sat, 14 Feb 2026 14:44:21 -0300 Subject: [PATCH] escape JavaScript in tooltip translations for WireGuard status update --- .../wireguard/peer_list/script_wireguard_status_update.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/wireguard/peer_list/script_wireguard_status_update.html b/templates/wireguard/peer_list/script_wireguard_status_update.html index 29f80f4..658cb72 100644 --- a/templates/wireguard/peer_list/script_wireguard_status_update.html +++ b/templates/wireguard/peer_list/script_wireguard_status_update.html @@ -264,7 +264,7 @@ if (!apiIps.includes(ip)) { ipSpan.style.color = 'red'; ipSpan.style.textDecoration = 'underline'; - ipSpan.title = '{% trans 'This address does not appear in the wg show command output, likely indicating that another peer has an IP overlapping this network or that the configuration file is outdated.' %}'; + ipSpan.title = '{% trans 'This address does not appear in the wg show command output, likely indicating that another peer has an IP overlapping this network or that the configuration file is outdated.'|escapejs %}'; allowedIpsIssue = true; } @@ -279,7 +279,7 @@ if (h5Element && !h5Element.querySelector('.fa-exclamation-triangle')) { const icon = document.createElement('i'); icon.className = 'fas fa-exclamation-triangle text-danger blink'; - icon.title = '{% trans 'At least one address does not appear in the wg show command output, which may indicate that another peer is using an overlapping IP or that the configuration file is outdated.' %}'; + icon.title = '{% trans 'At least one address does not appear in the wg show command output, which may indicate that another peer is using an overlapping IP or that the configuration file is outdated.'|escapejs %}'; h5Element.appendChild(icon); } }