Skip to content

Strip mailto: prefix from email identifiers - #2753

Open
c-tonneslan wants to merge 1 commit into
DemocracyClub:masterfrom
c-tonneslan:feat/accept-mailto-uri
Open

Strip mailto: prefix from email identifiers#2753
c-tonneslan wants to merge 1 commit into
DemocracyClub:masterfrom
c-tonneslan:feat/accept-mailto-uri

Conversation

@c-tonneslan

Copy link
Copy Markdown

Fixes #2735.

If you copy an email address out of a candidate's 'Contact' link on their council profile, you usually get something like mailto:sarah_freestone@labour.org.uk. Right now validate_email rejects that because of the scheme. Stripping it before validating means the address gets stored cleanly, the same way other identifier inputs already strip https://, @, etc.

If someone pastes 'mailto:foo@example.com' from a webpage's contact
link, validate_email rejects it. Strip the scheme first so the address
underneath gets validated and stored on its own.

Closes DemocracyClub#2735

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Accept mailTo URIs.

1 participant