feat(link): set rel to "noopener noreferrer" if target is "_blank"

Protects against cross-origin window.opener exploits when the target attribute is "_blank"
This commit is contained in:
Eric Liu 2020-09-04 17:05:47 -07:00
commit 4b7d254560

View file

@ -38,6 +38,7 @@
class:bx--link="{true}"
class:bx--link--disabled="{disabled}"
class:bx--link--inline="{inline}"
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
{...$$restProps}
on:click
on:mouseover