Allow apostrophes in email addresses when accounts are added via Dashboard
|Reported by:||boonebgorges||Owned by:|
|Component:||Users||Keywords:||has-patch needs-testing 3.9-early|
Currently it's not possible to add a user with an apostrophe in his email address in any of the following ways:
- Dashboard > Add User (non-MS)
- Dashboard > Add User > Add Existing User (MS)
- Dashboard > Add User > Add New User (MS)
With existing users, you get a 'user not found' error. Otherwise you get an error about invalid email addresses.
This is inconsistent with WP's basic email address behavior, which allows apostrophes in email addresses.
For the most part, the problem is simply that the value of 'email' in the $_POST data must be stripslashed. In a few cases, adjustments had to be made to the way that email addresses are escaped, to allow for the ' character (see esc_email()).
See attached patch.
Change History (17)
- Cc mail@… added
- Keywords 2nd-opinion added
- Severity changed from minor to normal
comment:7 wonderboymusic — 7 months ago
- Keywords needs-unit-tests added; dev-feedback 2nd-opinion removed
comment:12 follow-up: ↓ 13 nacin — 5 months ago
- Keywords 3.9-early added
- Milestone changed from 3.8 to Future Release