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

Social link: Trim rel attribute to avoid needless space. #55705

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

dmsnell
Copy link
Contributor

@dmsnell dmsnell commented Oct 30, 2023

Resolves Core-59682

When generating the rel attribute on social links, adds a trim() call for aesthetic reasons and also to prevent third-party code from breaking, when looking for rel="noopener".

Also removes a superfluous call to esc_attr() since the Tag Processor already escapes its attribute values.

What?

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

@github-actions
Copy link

Flaky tests detected in c805b3530996dcd8908a2956234f3dab729a59d5.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6695150296
📝 Reported issues:

Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

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

👍

@dmsnell dmsnell marked this pull request as ready for review October 30, 2023 19:00
@github-actions
Copy link

Warning: Type of PR label error

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] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: .

Read more about Type labels in Gutenberg.

Resolves Core-59682

When generating the `rel` attribute on social links, adds a `trim()` call
for aesthetic reasons and also to prevent third-party code from breaking,
when looking for `rel="noopener"`.

Also removes a superfluous call to `esc_attr()` since the Tag Processor
already escapes its attribute values.
@dmsnell dmsnell force-pushed the social-link/trim-rel-attribute branch from c805b35 to 929a37d Compare October 30, 2023 19:08
@dmsnell dmsnell merged commit 929a37d into trunk Oct 30, 2023
67 of 68 checks passed
@dmsnell dmsnell deleted the social-link/trim-rel-attribute branch October 30, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants