Limit attributes for external links (#950)

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2021-01-16 09:08:23 +01:00 committed by GitHub
parent d4b69d5006
commit c9168fcaa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ export class LinkInNewTabReplacer extends ComponentReplacer {
return undefined return undefined
} }
return <a {...node.attribs} rel='noopener noreferrer' target='_blank'> return <a className={node.attribs?.class} title={node.attribs?.title} href={node.attribs?.href} rel='noopener noreferrer' target='_blank'>
{ {
node.children?.map((child, index) => subNodeTransform(child, index)) node.children?.map((child, index) => subNodeTransform(child, index))
} }