question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link Support: target and rel attributes

See original GitHub issue

When 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
tmorehousecommented, May 18, 2017

Rather than putting too much logic into the component, we could just provide new props (target and rel) to the link component(s), and rely on the user assigning values appropriately for their use case.

1reaction
alexsasharegancommented, May 18, 2017

Maybe we should try to keep this on the PR. I’m getting dizzy!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found