ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
SimpleCheck.php
Go to the documentation of this file.
1
<?
php
2
7
class
HTMLPurifier_AttrDef_URI_Email_SimpleCheck
extends
HTMLPurifier_AttrDef_URI_Email
8
{
9
16
public
function
validate
($string,
$config
,
$context
)
17
{
18
// no support for named mailboxes i.e. "Bob <bob@example.com>"
19
// that needs more percent encoding to be done
20
if
($string ==
''
) {
21
return
false
;
22
}
23
$string = trim($string);
24
$result
= preg_match(
'/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i'
, $string);
25
return
$result
? $string :
false
;
26
}
27
}
28
29
// vim: et sw=4 sts=4
$context
$context
Definition:
webdav.php:25
$config
$config
Definition:
bootstrap.php:15
$result
$result
Definition:
CleanUpTest.php:463
HTMLPurifier_AttrDef_URI_Email
Definition:
Email.php:3
HTMLPurifier_AttrDef_URI_Email_SimpleCheck\validate
validate($string, $config, $context)
Definition:
SimpleCheck.php:16
php
HTMLPurifier_AttrDef_URI_Email_SimpleCheck
Primitive email validation class based on the regexp found at http://www.regular-expressions.info/email.html.
Definition:
SimpleCheck.php:7
libs
composer
vendor
ezyang
htmlpurifier
library
HTMLPurifier
AttrDef
URI
Email
SimpleCheck.php
Generated on Thu Jan 30 2025 19:01:16 for ILIAS by
1.8.13 (using
Doxyfile
)