Skip to content

Commit ae45222

Browse files
Kedaelndrtrbn
andauthored
[frontend] Remove links from Notifications (#6657)
Co-authored-by: Landry Trebon <[email protected]>
1 parent 4d2c170 commit ae45222

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

opencti-platform/opencti-front/src/components/ExpandableMarkdown.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import MarkdownDisplay from './MarkdownDisplay';
77
interface ExpandableMarkdownProps {
88
source?: string | null;
99
limit: number;
10+
removeLinks?: boolean;
1011
}
1112

1213
const ExpandableMarkdown: FunctionComponent<ExpandableMarkdownProps> = ({
1314
source,
1415
limit,
16+
removeLinks = false,
1517
}) => {
1618
const [expand, setExpand] = useState(false);
1719
const onClick = () => setExpand(!expand);
@@ -30,6 +32,7 @@ const ExpandableMarkdown: FunctionComponent<ExpandableMarkdownProps> = ({
3032
content={expand ? emptyFilled(source) : truncate(source, limit)}
3133
remarkGfmPlugin={true}
3234
commonmark={true}
35+
removeLinks={removeLinks}
3336
/>
3437
</div>
3538
</div>

opencti-platform/opencti-front/src/private/components/observations/indicators/IndicatorDetails.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const IndicatorDetailsComponent: FunctionComponent<IndicatorDetailsComponentProp
140140
>
141141
{t_i18n('Description')}
142142
</Typography>
143-
<ExpandableMarkdown source={indicator.description} limit={400} />
143+
<ExpandableMarkdown source={indicator.description} limit={400} removeLinks />
144144
<Typography
145145
variant="h3"
146146
gutterBottom={true}

opencti-platform/opencti-front/src/private/components/profile/notifications/NotificationLine.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ NotificationLineProps
273273
{events.length > 1 ? (
274274
<i>{t_i18n('Digest with multiple notifiers')}</i>
275275
) : (
276-
<MarkdownDisplay content={firstEvent?.message ?? '-'} remarkGfmPlugin={true} commonmark={true}/>
276+
<MarkdownDisplay content={firstEvent?.message ?? '-'} remarkGfmPlugin commonmark removeLinks/>
277277
)}
278278
</div>
279279
<div className={classes.bodyItem} style={{ width: dataColumns.created.width }}>

0 commit comments

Comments
 (0)