XOOPS 2.5.6
Final
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
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
L:
0xoops
xoops-2.5.6
htdocs
xoops_lib
modules
protector
library
HTMLPurifier
AttrDef
CSS
Ident.php
Generated on Fri May 10 2013 01:04:29 for XOOPS 2.5.6 by
1.8.3.1