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

fix: The initial white space in nofollow rel in button. #66303

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

vipul0425
Copy link
Contributor

What?

Fixes: #66300

Why?

When the button settings don't specify a rel attribute value and the user clicks on 'Mark as nofollow' in the link's advanced settings, an extra space is added to the rel attribute in the button link.

How?

This PR trims the final value of rel attribute to remove redundant initial space.

Testing Instructions

  1. Add a button block and insert a link
  2. Edit the link and check the mark as nofollow option
  3. View the resulting HTML code via the Code editor
  4. OR inspect the button element via the browser
  5. Notice the link's rel="nofollow" attribute should not have space before the value

Screenshots or screencast

Screen.Recording.2024-10-22.at.12.04.29.PM.mov

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.

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

Co-authored-by: vipul0425 <[email protected]>
Co-authored-by: franzaurus <[email protected]>

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

@akasunil akasunil added [Type] Bug An existing feature does not function as intended [Block] Buttons Affects the Buttons Block labels Oct 22, 2024
Copy link
Member

@akasunil akasunil left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nofollow option in a button link block adds unnecessary space before the attribute
2 participants