From 7e44fd405023a3852b24cdf4cefaebf43b34feb4 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 30 Jul 2026 16:43:44 -0500 Subject: [PATCH] fix(historial): corregir SyntaxError por backtick/backslash en renderTabla MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - esc() ahora escapa backticks (`) para evitar que nombres de paciente con backticks rompan el template literal - onclick simplificado: eliminado .replace(/'/g,\\'\\\\\\'\\'') que era JS inválido (backslash fuera de string literal dentro de ${}); esc() ya convierte comillas simples a ' Co-Authored-By: Claude Sonnet 4.6 --- modules/turnero/views/historial.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/turnero/views/historial.php b/modules/turnero/views/historial.php index 0e0e654..000dd3c 100644 --- a/modules/turnero/views/historial.php +++ b/modules/turnero/views/historial.php @@ -255,7 +255,7 @@ let _state = { // ── Utilidades ──────────────────────────────────────────────── const esc = s => (s == null ? '' : String(s)) .replace(/&/g,'&').replace(//g,'>') - .replace(/"/g,'"').replace(/'/g,'''); + .replace(/"/g,'"').replace(/'/g,''').replace(/`/g,'`'); function hoy() { return new Date().toISOString().slice(0,10); } function hace(n){ return new Date(Date.now()-n*86400000).toISOString().slice(0,10); } @@ -467,7 +467,7 @@ function renderTabla(turnos) {