fix: add noopener and noreferer attrs to link element in markdown viewer for security reason

This commit is contained in:
waychan23 2025-12-13 13:44:27 +08:00
parent 2f43042180
commit c19eb46b0d

View file

@ -28,7 +28,7 @@ export function MarkdownViewer({ content, className }: MarkdownViewerProps) {
</p>
),
a: ({ node, children, ...props }: any) => (
<a className="text-primary hover:underline" target="_blank" {...props}>
<a className="text-primary hover:underline" target="_blank" rel="noopener noreferrer" {...props}>
{children}
</a>
),