1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 17:24:46 +02:00

Updates to InputfieldEmail that were supposed to be in the previous commit

This commit is contained in:
Ryan Cramer
2023-02-15 08:33:59 -05:00
parent 1a633a74ae
commit d272fc9b09

View File

@@ -57,6 +57,7 @@ class InputfieldEmail extends InputfieldText {
$attrs = $this->getAttributes();
if((int) $this->allowIDN > 1) {
// UTF-8 emails are not supported by HTML5 email input type at least in current Chrome
$attrs['pattern'] = '[^@]+@[^\.]+\...+';
$attrs['type'] = 'text';
}
@@ -188,10 +189,9 @@ class InputfieldEmail extends InputfieldText {
*
*/
protected function sanitizeEmail($email) {
$email2 = $this->wire()->sanitizer->email($email, array(
return $this->wire()->sanitizer->email($email, array(
'allowIDN' => (int) $this->allowIDN,
));
return $email2;
}
/**