ILIAS
Release_4_4_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
Ident.php
Go to the documentation of this file.
1
<?php
2
6
class
HTMLPurifier_AttrDef_CSS_Ident
extends
HTMLPurifier_AttrDef
7
{
8
9
public
function
validate
($string, $config, $context) {
10
11
$string = trim($string);
12
13
// early abort: '' and '0' (strings that convert to false) are invalid
14
if
(!$string)
return
false
;
15
16
$pattern =
'/^(-?[A-Za-z_][A-Za-z_\-0-9]*)$/'
;
17
if
(!preg_match($pattern, $string))
return
false
;
18
return
$string;
19
20
}
21
22
}
23
24
// vim: et sw=4 sts=4
Services
Html
HtmlPurifier
library
HTMLPurifier
AttrDef
CSS
Ident.php
Generated on Wed Apr 27 2016 20:01:42 for ILIAS by
1.8.1.2 (using
Doxyfile
)