diff --git a/CloudServer/public/cablemanager.html b/CloudServer/public/cablemanager.html index d3c5a6a..d47a316 100644 --- a/CloudServer/public/cablemanager.html +++ b/CloudServer/public/cablemanager.html @@ -1536,14 +1536,24 @@ } } + function sanitizeDisplay(s) { + let v = String(s == null ? '' : s) + .replace(/[?¿?]+/g, '') + .replace(/\s+/g, ' ') + .trim(); + return v === '' ? '-' : v; + } + function escapeHtml(s) { - return String(s == null ? '' : s) + let v = sanitizeDisplay(s); + return v .replace(/&/g, '&').replace(//g, '>') .replace(/"/g, '"').replace(/'/g, '''); } function escapeAttr(s) { - return String(s == null ? '' : s) + let v = sanitizeDisplay(s); + return v .replace(/"/g, '"').replace(/'/g, '''); } diff --git a/CloudServer/public/generator.html b/CloudServer/public/generator.html index 3cacf7f..098d7f6 100644 --- a/CloudServer/public/generator.html +++ b/CloudServer/public/generator.html @@ -725,6 +725,14 @@