XOOPS 2.5.6
Final
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
TextDecoration.php
Go to the documentation of this file.
1
<?php
2
8
class
HTMLPurifier_AttrDef_CSS_TextDecoration
extends
HTMLPurifier_AttrDef
9
{
10
11
public
function
validate
($string,
$config
, $context) {
12
13
static
$allowed_values = array(
14
'line-through'
=>
true
,
15
'overline'
=>
true
,
16
'underline'
=>
true
,
17
);
18
19
$string = strtolower($this->
parseCDATA
($string));
20
21
if
($string ===
'none'
)
return
$string;
22
23
$parts = explode(
' '
, $string);
24
$final =
''
;
25
foreach
($parts as $part) {
26
if
(isset($allowed_values[$part])) {
27
$final .= $part .
' '
;
28
}
29
}
30
$final = rtrim($final);
31
if
($final ===
''
)
return
false
;
32
return
$final;
33
34
}
35
36
}
37
38
// vim: et sw=4 sts=4
L:
0xoops
xoops-2.5.6
htdocs
xoops_lib
modules
protector
library
HTMLPurifier
AttrDef
CSS
TextDecoration.php
Generated on Fri May 10 2013 01:04:29 for XOOPS 2.5.6 by
1.8.3.1