Skip to content

Nofollow option in a button link block adds unnecessary space before the attribute #66300

@franzaurus

Description

@franzaurus

As reported here.

When users add a link in the button block and mark it as nofollow, the resulting HTML comment adds unnecessary space before the attribute.

Steps to reproduce

  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 has space before the string

I've checked some other blocks that have "rel" attribute enabled (e.g. custom link, social icons, title, featured image, image, media, and text) with the help of this list and found that it only affects the button block.

As a workaround, users can edit the button instances via the code editor view and make the necessary edits to the HTML code there.

Environment
Studio, Local
WP 6.6.2 with/without Gutenberg 19.4.0
WP 6.7-beta3 without Gutenberg

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions