Skip to content

externalLinkRel not working if externalLinkTarget: '_blank' #1183

Closed
@denydias

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.

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