Update chat_window.php

This commit is contained in:
lizandrogd
2026-01-21 13:41:39 -05:00
parent 8856790d61
commit 3986931151
+2 -1
View File
@@ -650,8 +650,9 @@ if (empty($user_id)) {
}
if (isValidMediaUrl(fullUrl)) {
// Usar data-fullurl y dataset para evitar problemas de escapado en el onclick
contentHtml = `
<a href="#" onclick="openImageModal(${JSON.stringify(fullUrl)}); return false;" title="Abrir imagen">
<a href="#" data-fullurl="${escapeHtml(fullUrl)}" onclick="openImageModal(this.dataset.fullurl); return false;" title="Abrir imagen">
<img src="${escapeHtml(thumbUrl || fullUrl)}" alt="Imagen" class="message-media-image">
</a>`;
} else if (isValidMediaUrl(thumbUrl)) {