Link Support: target and rel attributes
See original GitHub issueWhen working with some of the special components that take to
or href
attributes (basically components using the link mixin), there isn’t support for passing down the target
and rel
attributes.
I would love it if the default prop value for rel
was rel="noopener noreferrer"
to add a security-boosting default per this article: https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/. Maybe that could be triggered with a computed property so it only kicks in if a target other than _self
is specified.
<template>
<b-navbar toggleable
type="inverse"
variant="primary">
<b-nav is-nav-bar>
<b-nav-item :href="FACEBOOK"
target="_blank"
rel="noopener noreferrer">
<i class="fa fa-fw fa-facebook"></i>
</b-nav-item>
</b-nav>
</b-navbar>
</template>
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:18 (18 by maintainers)
Top Results From Across the Web
HTML attribute: rel - HTML: HyperText Markup Language | MDN
The rel attribute defines the relationship between a linked resource and the current document. Valid on , , , and , the supported...
Read more >HTML rel Attribute - Dofactory
The rel attribute on an element defines the relationship between the current page and the linked page or resource. Possible values include: nofollow...
Read more >HTML link rel Attribute - W3Schools
The required rel attribute specifies the relationship between the current document and the linked document/resource. Browser Support. Attribute. rel, Yes, Yes ...
Read more >HTML | <link> rel Attribute - GeeksforGeeks
The HTML rel attribute is used to specify the relationship between the current and the linked document. It is used only when href...
Read more >HTML link rel attribute that matter for SEO explained
The rel="alternate" media attribute, mobile attribute for short, is used to indicate a relation between a desktop and a mobile website to search ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Rather than putting too much logic into the component, we could just provide new props (
target
andrel
) to the link component(s), and rely on the user assigning values appropriately for their use case.Maybe we should try to keep this on the PR. I’m getting dizzy!