fix: replace Espo.Utils.escapeString with jQuery text escaping

Espo.Utils.escapeString does not exist in EspoCRM 8.x, causing
TypeError crash when clicking dashlet cards. Use jQuery .text().html()
for XSS-safe HTML escaping instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 10:53:47 +00:00
parent f616065585
commit 62004360e8
3 changed files with 3 additions and 3 deletions
@@ -119,7 +119,7 @@ define('modules/smart-assistant/views/dashlets/smart-assistant', ['view'], funct
html += '<div style="padding: 6px 8px; border-bottom: 1px solid #f0f0f0; font-size: 12px; color: ' + color + ';">' +
'<span class="fas ' + icon + '" style="margin-left: 6px;"></span>' +
link + Espo.Utils.escapeString(a.message) + linkEnd +
link + $('<span>').text(a.message).html() + linkEnd +
'</div>';
});