ILIAS
release_4-4 Revision
◀ 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
10
public
function
validate
($string, $config, $context) {
11
// no support for named mailboxes i.e. "Bob <bob@example.com>"
12
// that needs more percent encoding to be done
13
if
($string ==
''
)
return
false
;
14
$string = trim($string);
15
$result
= preg_match(
'/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i'
, $string);
16
return
$result
? $string :
false
;
17
}
18
19
}
20
21
// vim: et sw=4 sts=4
$result
$result
Definition:
CleanUpTest.php:407
HTMLPurifier_AttrDef_URI_Email
Definition:
Email.php:3
HTMLPurifier_AttrDef_URI_Email_SimpleCheck\validate
validate($string, $config, $context)
Definition:
SimpleCheck.php:10
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
Services
Html
HtmlPurifier
library
HTMLPurifier
AttrDef
URI
Email
SimpleCheck.php
Generated on Mon Dec 21 2020 19:01:15 for ILIAS by
1.8.13 (using
Doxyfile
)