If Field Names are separated by a comma but include spaces - it breaks functionality

Created on 1 March 2023, almost 2 years ago
Updated 24 March 2023, over 1 year ago

Problem/Motivation

We noticed that some of our clients have this problem. They configured the Spamaway handler in a way that the Field Names setting included strings separated by commas, but included spaces. For example:

`first_name, last_name, e_mail, message`. But in order to make it work correctly, it should be:
`first_name,last_name,e_mail,message`.

Proposed resolution

https://git.drupalcode.org/project/spamaway/-/blob/2.0.0/src/Plugin/Webf...

use trim() after explode(), so whitespaces are removed from the beginning and end of a string.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024