@microsoft/omnichannel-chat-widget 1.0.4-main.5c98fd0 → 1.0.4-main.ade1159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,8 +9,6 @@ var _NotificationScenarios = require("../../webchatcontainerstateful/webchatcont
9
9
  var _NotificationHandler = require("../../webchatcontainerstateful/webchatcontroller/notification/NotificationHandler");
10
10
  var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
11
11
  var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
12
- var _dompurify = _interopRequireDefault(require("dompurify"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
12
  const processDisplayName = displayName => {
15
13
  // if displayname matches "teamsvisitor:<some alphanumeric string>", we replace it with "Customer"
16
14
  const displayNameRegex = ".+:.+";
@@ -66,8 +64,6 @@ const processContent = (transcriptContent, isAgentChat, renderMarkDown) => {
66
64
  }
67
65
  if (renderMarkDown) {
68
66
  transcriptContent = renderMarkDown(transcriptContent);
69
- } else {
70
- transcriptContent = _dompurify.default.sanitize(transcriptContent);
71
67
  }
72
68
  return transcriptContent;
73
69
  };
@@ -35,7 +35,6 @@ var _messageTimestampMiddleware = _interopRequireDefault(require("../../webchatc
35
35
  var _Constants = require("../../../common/Constants");
36
36
  var _endChat = require("./endChat");
37
37
  var _HyperlinkTextOverrideRenderer = _interopRequireDefault(require("../../webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer"));
38
- var _dompurify = _interopRequireDefault(require("dompurify"));
39
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
40
39
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
40
  const initWebChatComposer = (props, state, dispatch, chatSDK) => {
@@ -92,8 +91,6 @@ const initWebChatComposer = (props, state, dispatch, chatSDK) => {
92
91
  markdownRenderers.forEach(renderer => {
93
92
  text = renderer.render(text);
94
93
  });
95
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
96
- text = _dompurify.default.sanitize(text);
97
94
  return text;
98
95
  };
99
96
 
@@ -3,7 +3,6 @@ import { NotificationScenarios } from "../../webchatcontainerstateful/webchatcon
3
3
  import { NotificationHandler } from "../../webchatcontainerstateful/webchatcontroller/notification/NotificationHandler";
4
4
  import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
5
5
  import { LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
6
- import DOMPurify from "dompurify";
7
6
  const processDisplayName = displayName => {
8
7
  // if displayname matches "teamsvisitor:<some alphanumeric string>", we replace it with "Customer"
9
8
  const displayNameRegex = ".+:.+";
@@ -59,8 +58,6 @@ const processContent = (transcriptContent, isAgentChat, renderMarkDown) => {
59
58
  }
60
59
  if (renderMarkDown) {
61
60
  transcriptContent = renderMarkDown(transcriptContent);
62
- } else {
63
- transcriptContent = DOMPurify.sanitize(transcriptContent);
64
61
  }
65
62
  return transcriptContent;
66
63
  };
@@ -29,7 +29,6 @@ import createMessageTimeStampMiddleware from "../../webchatcontainerstateful/web
29
29
  import { ConversationEndEntity, ParticipantType } from "../../../common/Constants";
30
30
  import { getConversationDetails } from "./endChat";
31
31
  import HyperlinkTextOverrideRenderer from "../../webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer";
32
- import DOMPurify from "dompurify";
33
32
 
34
33
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
34
  export const initWebChatComposer = (props, state, dispatch, chatSDK) => {
@@ -86,8 +85,6 @@ export const initWebChatComposer = (props, state, dispatch, chatSDK) => {
86
85
  markdownRenderers.forEach(renderer => {
87
86
  text = renderer.render(text);
88
87
  });
89
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
- text = DOMPurify.sanitize(text);
91
88
  return text;
92
89
  };
93
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.0.4-main.5c98fd0",
3
+ "version": "1.0.4-main.ade1159",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",