-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for ticket 42957, preventing some users from creating accounts #1095
Conversation
Hi @daveagp! 👋 Thank you for your contribution to WordPress! 💖 It looks like this is your first pull request to No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making. More information about how GitHub pull requests can be used to contribute to WordPress can be found in this blog post. Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook. If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook. The Developer Hub also documents the various coding standards that are followed:
Thank you, |
* Renames file and test class * Adds more test scenarios * Relocates data provider for consistency * Adds keys for named test datasets * Adds keys in each test dataset to match test method parameters * Names data provider the same as the test except with `data` instead of `test`. * Adds ticket number to test method
* Renames to tell what it does when invoked, i.e. it encodes an ending period in a URL. * Guards to ensure a string is given as a URL to avoid errors when passing to PHP native functions. * Trims any surrounding spaces. * Uses str_ends_with() and rtrim() instead of prep_replace(). Why? More performant. str_ends_with()` polyfill was added to Core during 5.9. It's now available for use. Here's the benchmark for it https://3v4l.org/WdWih#v8.0.12
* @covers ::wp_url_encode_ending_period | ||
*/ | ||
class Tests_Functions_WpUrlEncodeEndingPeriod extends WP_UnitTestCase { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope it's failing because this PR is set to master
and not trunk
. Will reopen a new PR and reference this one.
Closing as this PR is based on |
On my website we get about one email a month from a person who can't create an account. This turns out to be caused by https://core.trac.wordpress.org/ticket/42957
Fixes this by encoding the trailing period as an entity.
This is my first submitted pull request to WP, thanks in advance for telling me if any more steps are needed.
Trac ticket: https://core.trac.wordpress.org/ticket/42957