Space is double-escaped when submitting custom shorturl keyword
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 12.2k
- Forks
- 2.1k
- Avg merge
- 6h 15m
- Merged PRs (30d)
- 7
Description
Code of Conduct
- I agree to follow this project's Code of Conduct.
Submission validity
- This is not a personal support request, that should be posted on discussions community.
- I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.
Self troubleshooting
- I've read the documentation and made sure to follow it.
- I've read the troubleshooting first steps and frequent issues guides.
Version
1.9.2
Description
When using a simple custom plugin such as shown in #3694 to allow (%20) in shorturl keywords, it is still not possible to create a custom keyword containing via the admin panel.
As submitted to the admin-ajax.php endpoint, the custom keyword (e.g. some space) appears to be double-escaped as some%2520space in the parameters sent. This leads the backend to create a shorturl with the incorrect keyword some20space.
Expectation
The frontend should only escape the keyword parameter containing a space once (some%20space), and the backend should then create the keyword some space (assuming that has been added to the shorturl charset by a plugin).
Reproduction steps
No response
Context
No response
Contributor guide
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 custom keyword submission through the admin panel to the admin-ajax.php endpoint, using the double-escaped value described in the issue. Check where the keyword is escaped on the frontend and decoded by the backend. Done means a keyword such as some space is sent once as some%20space and is created as some space when a plugin permits spaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- full-stack
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100