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

externalLinkRel not working if externalLinkTarget: '_blank' #1183

Closed
1 task done
denydias opened this issue May 18, 2020 · 4 comments · Fixed by #1186
Closed
1 task done

externalLinkRel not working if externalLinkTarget: '_blank' #1183

denydias opened this issue May 18, 2020 · 4 comments · Fixed by #1186
Labels
bug confirmed as a bug PR Welcome

Comments

@denydias
Copy link

denydias commented May 18, 2020

Bug Report

Re. #917 / #914, when externalLinkTarget: '_blank' and externalLinkRel: 'noopener', href should be:

<a href="https://outthere.com" target="_blank" rel="noopener">

but it's being generated as:

<a href="https://outthere.com" target="_blank">

Steps to reproduce

  1. Add an external link to a markdown file:

    [Out There](https://outthere.com)
    
  2. Add this do window.$docsify:

    externalLinkTarget:  '_blank',
    externalLinkRel: 'noopener'
    

What is current behaviour

Links are generated without rel="noopener". Example:

<a href="https://outthere.com" target="_blank">

What is the expected behaviour

Links should have rel="noopener". Example:

<a href="https://outthere.com" target="_blank" rel="noopener">

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: GNU Linux

  • Node.js version: none

  • npm/yarn version: none

  • Browser version: Chromium 81.0.4044.138

  • Docsify version: 4.11.3

  • Docsify plugins: docsify-copy-code, external-script, search, zoom-image, prism-bash, prism-json, prism-markdown, docsify-tabs

Please create a reproducible sandbox

Edit angry-pasteur-414ut

Mention the docsify version in which this bug was not present (if any)

Not tested in other versions.

PS: add to showcase

I've just published a brand new website of my company made entirely with docsify. I would appreciate to have it listed in the showcase. The entry might look like:

- [eDok](https://www.edok.com.br/) - A safe, full featured ECM (Electronic Content Management) for the paperless business.
@anikethsaha
Copy link
Member

This seems like a bug.

PS: add to showcase

I've just published a brand new website of my company made entirely with docsify. I would appreciate to have it listed in the showcase. The entry might look like:

- [eDok](https://www.edok.com.br/) - A safe, full featured ECM (Electronic Content Management) f

Submit a PR in awesome-docsify

@denydias
Copy link
Author

Submit a PR in awesome-docsify

Done here. Thanks for the heads up.

@anikethsaha
Copy link
Member

This has been removed somehow in this commit 724ac02#diff-d73f215ac772d2673dd8c51f24976e4eL256

Thanks for pointing. It will be fixed soon

@denydias
Copy link
Author

Glad to help.

anikethsaha added a commit to anikethsaha/docsify that referenced this issue May 20, 2020
anikethsaha added a commit that referenced this issue May 22, 2020
fix: fixed target and rel issue (fixes #1183)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed as a bug PR Welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants