AdvancedCustomFields / AdvancedCustomFields/acf
Trim whitespace on Link fields url
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hello there,
I just realized that it was possible for to add a trailing whitespace at the end of an URL while editing a Link field:
It's not a big deal, I just added a function on the acf/update_value/type=link filter to trim these whitespaces, but I can't see any use case where someone needs to keep them. So my question is : Shouldn't it be included in the sanitization process done by ACF itself ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the acf/update_value/type=link filter and the Link field sanitization path for the URL value. Confirm how trailing whitespace is currently stored, then verify that the URL is trimmed without affecting other Link field values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100