Ver código fonte

fix: not permitted schema of markdown link cause page crash (#21258)

tags/1.5.0
非法操作 4 meses atrás
pai
commit
40e8ad419b
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      web/app/components/base/markdown-blocks/link.tsx

+ 1
- 1
web/app/components/base/markdown-blocks/link.tsx Ver arquivo

@@ -16,7 +16,7 @@ const Link = ({ node, children, ...props }: any) => {
}
else {
const href = props.href || node.properties?.href
if(!isValidUrl(href))
if(!href || !isValidUrl(href))
return <span>{children}</span>

return <a href={href} target="_blank" className="cursor-pointer underline !decoration-primary-700 decoration-dashed">{children || 'Download'}</a>

Carregando…
Cancelar
Salvar