escape JavaScript in tooltip translations for WireGuard status update

This commit is contained in:
Eduardo Silva
2026-02-14 14:44:21 -03:00
parent 1a5169d823
commit 04c955ac77

View File

@@ -264,7 +264,7 @@
if (!apiIps.includes(ip)) { if (!apiIps.includes(ip)) {
ipSpan.style.color = 'red'; ipSpan.style.color = 'red';
ipSpan.style.textDecoration = 'underline'; 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; allowedIpsIssue = true;
} }
@@ -279,7 +279,7 @@
if (h5Element && !h5Element.querySelector('.fa-exclamation-triangle')) { if (h5Element && !h5Element.querySelector('.fa-exclamation-triangle')) {
const icon = document.createElement('i'); const icon = document.createElement('i');
icon.className = 'fas fa-exclamation-triangle text-danger blink'; 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); h5Element.appendChild(icon);
} }
} }