mirror of
https://github.com/langgenius/dify.git
synced 2026-06-26 06:41:10 +08:00
Merge de866d617b into 4f4ac27de2
This commit is contained in:
commit
f72bfd8ffa
@ -36,6 +36,10 @@ const Link = ({ node, children, ...props }: any) => {
|
||||
if (!href || !isValidUrl(href))
|
||||
return <span>{children}</span>
|
||||
|
||||
// Handle mailto: links without target="_blank" to allow email client to open directly
|
||||
if (href.toString().startsWith('mailto:'))
|
||||
return <a href={href} className={commonClassName}>{children}</a>
|
||||
|
||||
return <a href={href} target="_blank" rel="noopener noreferrer" className={commonClassName}>{children || 'Download'}</a>
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user