EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
strip html in notification message
Yuri Kuznetsov40157bcb8c90
diff --git a/client/src/views/notification/items/message.js b/client/src/views/notification/items/message.jsindex fc2a22f69f..dbe2e789c0 100644--- a/client/src/views/notification/items/message.js+++ b/client/src/views/notification/items/message.js@@ -27,7 +27,6 @@************************************************************************/import BaseNotificationItemView from 'views/notification/items/base';-import {marked} from 'marked';import DOMPurify from 'dompurify';class MessageNotificationItemView extends BaseNotificationItemView {@@ -45,7 +44,8 @@ class MessageNotificationItemView extends BaseNotificationItemView {const data = /** @type {Object.<string, *>} */this.model.get('data') || {};const messageRaw = this.model.get('message') || data.message || '';- const message = marked.parse(messageRaw);++ const message = this.getHelper().transformMarkdownText(messageRaw);this.messageTemplate = DOMPurify.sanitize(message, {}).toString();