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

Feature Request: Add rel attribute support on ExternalLinks #476

Closed
markhalliwell opened this issue May 14, 2020 · 0 comments · Fixed by #480
Closed

Feature Request: Add rel attribute support on ExternalLinks #476

markhalliwell opened this issue May 14, 2020 · 0 comments · Fixed by #480
Assignees
Labels
do not close Issue which won't close due to inactivity enhancement New functionality or behavior implemented Change has been implemented
Milestone

Comments

@markhalliwell
Copy link
Contributor

Description
Currently, the rel attribute is hardcoded to noopener noreferrer with no support for nofollow at all.

Based on https://git.drupalcode.org/project/markdown/-/blob/8.x-2.x/src/Plugin/Markdown/CommonMark/Extension/ExternalLinkExtension.php#L119-145:

Add new config options:

  • external_link/nofollow
  • external_link/noopener
  • external_link/noreferrer

That can be set to one of the following values:

  • - No links (empty string)
  • all - All links
  • external - External links only
  • internal - Internal links only

Then the rel attribute can be determined provided these settings:
https://git.drupalcode.org/project/markdown/-/blob/8.x-2.x/src/Plugin/Markdown/CommonMark/Extension/ExternalLinkExtension.php#L211-227

@markhalliwell markhalliwell added the enhancement New functionality or behavior label May 14, 2020
@colinodell colinodell self-assigned this May 14, 2020
@colinodell colinodell added the do not close Issue which won't close due to inactivity label May 14, 2020
@colinodell colinodell added this to the v1.5 milestone May 14, 2020
@close-label close-label bot added the implemented Change has been implemented label May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not close Issue which won't close due to inactivity enhancement New functionality or behavior implemented Change has been implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants