Skip to content

Handle unicode whitespace consistently in form inputs#19869

Merged
danharrin merged 1 commit into
filamentphp:4.xfrom
ukeloop:feature/use-str-trim-for-field-normalization
May 20, 2026
Merged

Handle unicode whitespace consistently in form inputs#19869
danharrin merged 1 commit into
filamentphp:4.xfrom
ukeloop:feature/use-str-trim-for-field-normalization

Conversation

@ukeloop
Copy link
Copy Markdown
Contributor

@ukeloop ukeloop commented May 17, 2026

Description

Replace native trim() calls with Str::trim() to normalize whitespace consistently across form inputs.

This change improves handling of Unicode and multibyte whitespace characters (such as full-width spaces) in addition to standard ASCII whitespace.

This behavior now matches Laravel's TrimStrings middleware.

Visual changes

No changes

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@github-project-automation github-project-automation Bot moved this to Todo in Roadmap May 17, 2026
@danharrin danharrin added this to the v4 milestone May 20, 2026
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Roadmap May 20, 2026
@danharrin danharrin added bug Something isn't working and removed pending review labels May 20, 2026
@danharrin danharrin merged commit 480786b into filamentphp:4.x May 20, 2026
24 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Roadmap May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants