Problem/Motivation

When adding multiple button attributes, the attribute values have a trailing space like this:
my-attribute="value "

This only happens if there is more than one attribute.

Also I was only noticing this on the production server not on my local development server, using the exact same views config. So Im guessing it has to do with the way my two environments handle line breaks.

Proposed resolution

add a trim() around the attribute value when rendering the button.

I will provide a patch.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

loze created an issue. See original summary.

loze’s picture

Issue summary: View changes
loze’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB
loze’s picture

Issue summary: View changes
loze’s picture

Issue summary: View changes

laboratory.mike made their first commit to this issue’s fork.

laboratory.mike’s picture

Looks good, I'll check it out and get it merged after QA.

terry_kolodiy’s picture

Status: Needs review » Reviewed & tested by the community

The patch works fine. The problem is gone. I think it can be merged

terry_kolodiy’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.