fix: bad syntax

This commit is contained in:
nate 2026-03-19 15:25:04 +04:00
parent 723708cf8b
commit f9c835f591
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@
<% if (barPings.length > 0) { %>
<% barPings.forEach(function(c) {
const color = c.down === 0 ? 'bg-green-500/70' : (c.up === 0 ? 'bg-red-500/70' : 'bg-orange-400/70');
const regionsJson = JSON.stringify(c.regions).replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
const regionsJson = JSON.stringify(c.regions).split('&').join('&amp;').split('"').join('&quot;').split('<').join('&lt;').split(String.fromCharCode(62)).join('&gt;');
%>
<div class="flex-1 rounded-sm <%= color %> cursor-pointer" data-run="<%= c.run_id %>" data-up="<%= c.up %>" data-down="<%= c.down %>" data-total="<%= c.total %>" data-time="<%= c.checked_at %>" data-regions="<%~ regionsJson %>"></div>
<% }) %>