mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
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:
parent
00b9068b86
commit
4b7d254560
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue