Skip to content

Commit 9849512

Browse files
UI - Merge missed code added
1 parent d973164 commit 9849512

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

frontend/src/pages/chat/Components/CitationPanel.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ interface CitationPanelProps {
1515
}
1616

1717
export const CitationPanel: React.FC<CitationPanelProps> = ({ activeCitation, IsCitationPanelOpen, onViewSource }) => {
18+
19+
const renderLink = (props: any) => {
20+
return <a {...props} target="_blank" rel="noopener noreferrer" />;
21+
};
22+
1823
return (
1924
<Stack.Item className={styles.citationPanel} tabIndex={0} role="tabpanel" aria-label="Citations Panel">
2025
<Stack
@@ -45,11 +50,13 @@ export const CitationPanel: React.FC<CitationPanelProps> = ({ activeCitation, Is
4550
</h5>
4651
<div tabIndex={0}>
4752
<ReactMarkdown
48-
linkTarget="_blank"
4953
className={styles.citationPanelContent}
5054
children={DOMPurify.sanitize(activeCitation.content, { ALLOWED_TAGS: XSSAllowTags })}
5155
remarkPlugins={[remarkGfm]}
5256
rehypePlugins={[rehypeRaw]}
57+
components={{
58+
a: renderLink,
59+
}}
5360
/>
5461
</div>
5562
</Stack.Item>

0 commit comments

Comments
 (0)