6
6
import { Button , Divider , Input , Select , Tooltip } from "antd" ;
7
7
import { debounce } from "lodash" ;
8
8
import { useDebounce } from "use-debounce" ;
9
-
10
9
import {
11
10
ButtonGroup ,
12
11
Col ,
@@ -35,7 +34,6 @@ import SelectComputeServerForFile from "@cocalc/frontend/compute/select-server-f
35
34
import StaticMarkdown from "@cocalc/frontend/editors/slate/static-markdown" ;
36
35
import { FrameContext } from "@cocalc/frontend/frame-editors/frame-tree/frame-context" ;
37
36
import { SaveButton } from "@cocalc/frontend/frame-editors/frame-tree/save-button" ;
38
- import { sanitize_html_safe } from "@cocalc/frontend/misc" ;
39
37
import { hoursToTimeIntervalHuman } from "@cocalc/util/misc" ;
40
38
import { FormattedMessage } from "react-intl" ;
41
39
import { ChatActions } from "./actions" ;
@@ -138,7 +136,6 @@ export const ChatRoom: React.FC<Props> = ({ project_id, path, is_visible }) => {
138
136
function render_preview_message ( ) : JSX . Element | undefined {
139
137
if ( ! is_preview ) return ;
140
138
if ( input . length === 0 || preview . length === 0 ) return ;
141
- const value = sanitize_html_safe ( preview ) ;
142
139
143
140
return (
144
141
< Row style = { { position : "absolute" , bottom : "0px" , width : "100%" } } >
@@ -158,7 +155,7 @@ export const ChatRoom: React.FC<Props> = ({ project_id, path, is_visible }) => {
158
155
>
159
156
< Icon name = "times" />
160
157
</ div >
161
- < StaticMarkdown value = { value } />
158
+ < StaticMarkdown value = { preview } />
162
159
< div className = "small lighten" style = { { marginTop : "15px" } } >
163
160
Preview (press Shift+Enter to send)
164
161
</ div >
0 commit comments