Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't entirely remove target attribute from regular URL? #187

Closed
VirtualWolf opened this issue Jan 15, 2017 · 1 comment
Closed

Can't entirely remove target attribute from regular URL? #187

VirtualWolf opened this issue Jan 15, 2017 · 1 comment

Comments

@VirtualWolf
Copy link

I have a function that includes this:

if (context) {
    context = context.linkify({
        formatHref: {
            mention: href => 'https://twitter.com' + href,
        },
        target: {
            url: null,
        },
        nl2br: true,
    });
}

Setting target to null still results in target="_blank" being set in the output though. Looking at linkify-string.js, it seems that it's only looking for it to be set to something other than null, and if it's null it applies the default target? Is there any easy way to remove the target entirely (similar to #144 for linkClass)? I'm running linkify v2.1.4.

Thanks!

@nfrasser
Copy link
Collaborator

nfrasser commented Mar 3, 2018

Fixed in v2.1.6

@nfrasser nfrasser closed this as completed Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants