Skip to content

externalLinkRel not working if externalLinkTarget: '_blank' #1183

Closed

Description

@denydias

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.

Activity

  1. anikethsaha commented on May 19, 2020

    @anikethsaha
    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

  2. denydias commented on May 20, 2020

    @denydias
    Author

    Submit a PR in awesome-docsify

    Done here. Thanks for the heads up.

  3. anikethsaha commented on May 20, 2020

    @anikethsaha
    Member

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

    Thanks for pointing. It will be fixed soon

  4. denydias commented on May 20, 2020

    @denydias
    Author

    Glad to help.

  5. added a commit that references this issue on May 20, 2020
    3d662a5
  6. added a commit that references this issue on May 22, 2020
    c0d3280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions