[wp-trac] [WordPress Trac] #47557: Sanitize Email Suggestion
WordPress Trac
noreply at wordpress.org
Thu Mar 23 16:11:53 UTC 2023
#47557: Sanitize Email Suggestion
------------------------------------------+------------------------------
Reporter: dandersoncm | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 5.2.1
Severity: minor | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+------------------------------
Comment (by bhubbard):
Here is a test function:
{{{#!php
<?php
public function test_clean_billing_email_address()
{
$value = 'user123 at example.com123';
$expected = 'user123 at example.com';
$result = clean_billing_email_address($value);
$this->assertEquals($expected, $result);
$value = ' user456 at example.com ';
$expected = 'user456 at example.com';
$result = clean_billing_email_address($value);
$this->assertEquals($expected, $result);
$value = ' user789 at example.com 123';
$expected = 'user789 at example.com';
$result = clean_billing_email_address($value);
$this->assertEquals($expected, $result);
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47557#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list