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

Stop adding “noreferrer” to external links. #26968

Open
wants to merge 13 commits into
base: trunk
Choose a base branch
from

Conversation

adamsilverstein
Copy link
Member

Description

Fixes #26914.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

packages/block-library/src/file/save.js Outdated Show resolved Hide resolved
@@ -1,3 +1,3 @@
<!-- wp:file {"href":"http://localhost:8888/wp-content/uploads/2018/05/keycodes.js","showDownloadButton":true} -->
<div class="wp-block-file"><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" target="_blank" rel="noreferrer noopener">6546</a><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" class="wp-block-file__button" download>Download</a></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a deprecation is needed, the practice here is to keep the old markup in a fixture called packages/e2e-tests/fixtures/blocks/core__file__deprecated-1.html which will add test coverage ensuring the deprecation works. The new fixture can be added as well alongside it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @talldan - finally getting back to this :)

Since there is now already a core__file__new-window__deprecated-1.html I assume I need to create core__file__new-window__deprecated-2.html? do I then leave the original and first deprecation untouched?

@talldan talldan added [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Nov 24, 2020
@talldan talldan modified the milestones: WordPress 5.x, 5.6 Nov 24, 2020
@tellthemachines tellthemachines removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 25, 2020
Base automatically changed from master to trunk March 1, 2021 15:44
@adamsilverstein
Copy link
Member Author

Looks like this dropped off my radar. I will try to revisit soon and land this. As far as I can tell, the only outstanding item (other than resolving merge conflicts) was adding a deprecation for the file block. Also, I will review the codebase to make sure more noreferrer links have been added in the meantime.

@adamsilverstein adamsilverstein marked this pull request as ready for review January 26, 2024 17:54
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: [Feature] Link Editing.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@Mamaduka Mamaduka added the [Type] Enhancement A suggestion for improvement. label Jan 26, 2024
@dcalhoun dcalhoun removed their request for review August 28, 2024 19:01
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @Hastibe, @vitalytennant, @wpjames.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: Hastibe, vitalytennant, wpjames.

Co-authored-by: adamsilverstein <adamsilverstein@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: SergeyBiryukov <sergeybiryukov@git.wordpress.org>
Co-authored-by: pablinos <pabline@git.wordpress.org>
Co-authored-by: isaumya <isaumya@git.wordpress.org>
Co-authored-by: tomtolkien <thomastolkien@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@adamsilverstein
Copy link
Member Author

  • needs: update the linter to stop flagging corrections
  • add deprecation(s) as needed, see above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.
Projects
Status: PR needs review
Development

Successfully merging this pull request may close these issues.

Stop adding rel=noreferrer to links that open in a new tab
4 participants