This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Site address login: correctly remove wp-admin from the url string
#583
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref: wordpress-mobile/WordPress-iOS#16145
WPiOS PR: wordpress-mobile/WordPress-iOS#16186
When a user enters a site address to log in,
wp-adminis removed before string is validated. Previously, if anything came afterwp-adminthe regex match would fail, causing the API not to recognize the URL. This change updates the regex pattern to removewp-adminand anything after it.Bonus: I added the clear button to text entry fields in the auth views, set to appear when editing.
Can be tested with the referenced WPiOS PR.
Note:
swiftlint autocorrectfound a lot of changes. The commit for this fix is c036825.