@tellescope/chat 1.251.0 → 1.252.0
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.252.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
"@fontsource/roboto": "4.5.8",
|
|
39
39
|
"@mui/icons-material": "5.15.0",
|
|
40
40
|
"@mui/material": "5.15.0",
|
|
41
|
-
"@tellescope/constants": "1.
|
|
42
|
-
"@tellescope/react-components": "1.
|
|
43
|
-
"@tellescope/sdk": "1.
|
|
44
|
-
"@tellescope/types-client": "1.
|
|
45
|
-
"@tellescope/types-models": "1.
|
|
46
|
-
"@tellescope/types-utilities": "1.
|
|
47
|
-
"@tellescope/utilities": "1.
|
|
41
|
+
"@tellescope/constants": "1.252.0",
|
|
42
|
+
"@tellescope/react-components": "1.252.0",
|
|
43
|
+
"@tellescope/sdk": "1.252.0",
|
|
44
|
+
"@tellescope/types-client": "1.252.0",
|
|
45
|
+
"@tellescope/types-models": "1.252.0",
|
|
46
|
+
"@tellescope/types-utilities": "1.252.0",
|
|
47
|
+
"@tellescope/utilities": "1.252.0",
|
|
48
48
|
"react-native-image-picker": "7.0.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
52
52
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "00b42c82462699491547e2bded4aad41a5d57daa",
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
}
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "@tellescope/react-components"
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
import { HTMLMessageProps } from './components';
|
|
18
|
-
import {
|
|
18
|
+
import { sanitize_user_html } from '@tellescope/utilities';
|
|
19
19
|
import RenderHtml from 'react-native-render-html';
|
|
20
20
|
|
|
21
21
|
export const HTMLMessage = ({ html: htmlUnprocessed, color="white", selectable=true } : HTMLMessageProps) => {
|
|
@@ -34,7 +34,7 @@ export const HTMLMessage = ({ html: htmlUnprocessed, color="white", selectable=t
|
|
|
34
34
|
contentWidth={width}
|
|
35
35
|
source={{
|
|
36
36
|
html: (
|
|
37
|
-
|
|
37
|
+
sanitize_user_html(html)
|
|
38
38
|
)
|
|
39
39
|
}}
|
|
40
40
|
tagsStyles={{
|
package/src/components.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
SendIcon,
|
|
8
8
|
useChats,
|
|
9
9
|
} from "@tellescope/react-components"
|
|
10
|
-
import {
|
|
10
|
+
import { sanitize_user_html, user_display_name } from "@tellescope/utilities";
|
|
11
11
|
|
|
12
12
|
const stripOuterParagraphTags = (html: string): string => {
|
|
13
13
|
let result = html.trim()
|
|
@@ -27,7 +27,7 @@ export interface HTMLMessageProps {
|
|
|
27
27
|
export const HTMLMessage = ({ html } : HTMLMessageProps) => (
|
|
28
28
|
<div style={{ padding: 2 }}
|
|
29
29
|
dangerouslySetInnerHTML={{
|
|
30
|
-
__html:
|
|
30
|
+
__html: sanitize_user_html(
|
|
31
31
|
stripOuterParagraphTags(html).replace(/<a/g, '<a style="color: white;"')
|
|
32
32
|
),
|
|
33
33
|
}}
|