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:
@@ -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>';
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user