diff --git a/conversations.php b/conversations.php index 2eb1e69..aea0cce 100644 --- a/conversations.php +++ b/conversations.php @@ -1,23 +1,11 @@ @@ -2774,8 +2762,11 @@ if (!isset($_SESSION['user_id'])) { const unreadClass = (conv.unread_count && conv.unread_count > 0 && !isActive) ? 'unread' : ''; const attentionClass = conv.advisor_requested ? ' attention' : ''; + // Escapar apóstrofes/comillas en nombre y teléfono para no romper el onclick + const safeName = (conv.name || '').replace(/\\/g, '\\\\').replace(/'/g, "\\'"); + const safePhone = (conv.phone_number || '').replace(/\\/g, '\\\\').replace(/'/g, "\\'"); return ` -